Skip to content

Commit

Permalink
Fix cabal check for hie-compat (haskell/ghcide#879)
Browse files Browse the repository at this point in the history
* Fix cabal check for hie-compat

* ghc-lib :((((((
  • Loading branch information
wz1000 authored Oct 23, 2020
1 parent 412a360 commit 998e396
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 41 deletions.
60 changes: 19 additions & 41 deletions ghcide/hie-compat/hie-compat.cabal
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
cabal-version: >=1.10
cabal-version: 1.22
name: hie-compat
version: 0.1.0.0
synopsis: HIE files for GHC 8.6 and other HIE file backports
license: Apache-2.0
description:
Backports for HIE files to GHC 8.6, along with a few other backports
of HIE file related fixes for ghcide
of HIE file related fixes for ghcide.

THIS DOES NOT LET YOU READ HIE FILES WITH MISMATCHED VERSIONS OF GHC
license-file: LICENSE
author: Zubin Duggal
maintainer: [email protected]
build-type: Simple
extra-source-files: CHANGELOG.md

extra-source-files: CHANGELOG.md README.md
category: Development

flag ghc-lib
description: build against ghc-lib instead of the ghc package
Expand All @@ -22,46 +23,23 @@ flag ghc-lib
library
default-language: Haskell2010
build-depends:
base, array, bytestring, containers, directory, filepath, transformers

base < 4.15, array, bytestring, containers, directory, filepath, transformers
if flag(ghc-lib)
build-depends:
ghc-lib
hs-source-dirs: src-ghc88
reexported-modules:
HieTypes as Compat.HieTypes,
HieDebug as Compat.HieDebug,
HieUtils as Compat.HieUtils
exposed-modules:
Compat.HieAst
Compat.HieBin
build-depends: ghc-lib
else
build-depends:
ghc,
ghc-boot
build-depends: ghc, ghc-boot

exposed-modules:
Compat.HieAst
Compat.HieBin
Compat.HieTypes
Compat.HieDebug
Compat.HieUtils

if (impl(ghc > 8.5) && impl(ghc < 8.7) && !flag(ghc-lib))
hs-source-dirs: src-ghc86
exposed-modules:
Compat.HieAst
Compat.HieBin
Compat.HieTypes
Compat.HieDebug
Compat.HieUtils
if (impl(ghc > 8.7) && impl(ghc < 8.10) && !flag(ghc-lib))
hs-source-dirs: src-ghc88
exposed-modules:
Compat.HieAst
Compat.HieBin
if (impl(ghc > 8.9) && impl(ghc < 8.11) && !flag(ghc-lib))
hs-source-dirs: src-ghc810
exposed-modules:
Compat.HieAst
Compat.HieBin

if (impl(ghc > 8.7) && impl(ghc < 8.11) && !flag(ghc-lib))
reexported-modules:
HieTypes as Compat.HieTypes,
HieDebug as Compat.HieDebug,
HieUtils as Compat.HieUtils
if ((impl(ghc > 8.7) && impl(ghc < 8.10)) || flag(ghc-lib))
hs-source-dirs: src-ghc88 src-reexport
if (impl(ghc > 8.9) && impl(ghc < 8.11))
hs-source-dirs: src-ghc810 src-reexport

3 changes: 3 additions & 0 deletions ghcide/hie-compat/src-reexport/Compat/HieDebug.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module Compat.HieDebug
( module HieDebug ) where
import HieDebug
3 changes: 3 additions & 0 deletions ghcide/hie-compat/src-reexport/Compat/HieTypes.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module Compat.HieTypes
( module HieTypes ) where
import HieTypes
3 changes: 3 additions & 0 deletions ghcide/hie-compat/src-reexport/Compat/HieUtils.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module Compat.HieUtils
( module HieUtils ) where
import HieUtils

0 comments on commit 998e396

Please sign in to comment.