Skip to content

Commit e2ee58f

Browse files
authored
Fix cabal check for hie-compat (#879)
* Fix cabal check for hie-compat * ghc-lib :((((((
1 parent 5bf1532 commit e2ee58f

File tree

4 files changed

+28
-41
lines changed

4 files changed

+28
-41
lines changed

hie-compat/hie-compat.cabal

Lines changed: 19 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
cabal-version: >=1.10
1+
cabal-version: 1.22
22
name: hie-compat
33
version: 0.1.0.0
44
synopsis: HIE files for GHC 8.6 and other HIE file backports
55
license: Apache-2.0
66
description:
77
Backports for HIE files to GHC 8.6, along with a few other backports
8-
of HIE file related fixes for ghcide
8+
of HIE file related fixes for ghcide.
9+
910
THIS DOES NOT LET YOU READ HIE FILES WITH MISMATCHED VERSIONS OF GHC
1011
license-file: LICENSE
1112
author: Zubin Duggal
1213
maintainer: [email protected]
1314
build-type: Simple
14-
extra-source-files: CHANGELOG.md
15-
15+
extra-source-files: CHANGELOG.md README.md
16+
category: Development
1617

1718
flag ghc-lib
1819
description: build against ghc-lib instead of the ghc package
@@ -22,46 +23,23 @@ flag ghc-lib
2223
library
2324
default-language: Haskell2010
2425
build-depends:
25-
base, array, bytestring, containers, directory, filepath, transformers
26-
26+
base < 4.15, array, bytestring, containers, directory, filepath, transformers
2727
if flag(ghc-lib)
28-
build-depends:
29-
ghc-lib
30-
hs-source-dirs: src-ghc88
31-
reexported-modules:
32-
HieTypes as Compat.HieTypes,
33-
HieDebug as Compat.HieDebug,
34-
HieUtils as Compat.HieUtils
35-
exposed-modules:
36-
Compat.HieAst
37-
Compat.HieBin
28+
build-depends: ghc-lib
3829
else
39-
build-depends:
40-
ghc,
41-
ghc-boot
30+
build-depends: ghc, ghc-boot
31+
32+
exposed-modules:
33+
Compat.HieAst
34+
Compat.HieBin
35+
Compat.HieTypes
36+
Compat.HieDebug
37+
Compat.HieUtils
4238

4339
if (impl(ghc > 8.5) && impl(ghc < 8.7) && !flag(ghc-lib))
4440
hs-source-dirs: src-ghc86
45-
exposed-modules:
46-
Compat.HieAst
47-
Compat.HieBin
48-
Compat.HieTypes
49-
Compat.HieDebug
50-
Compat.HieUtils
51-
if (impl(ghc > 8.7) && impl(ghc < 8.10) && !flag(ghc-lib))
52-
hs-source-dirs: src-ghc88
53-
exposed-modules:
54-
Compat.HieAst
55-
Compat.HieBin
56-
if (impl(ghc > 8.9) && impl(ghc < 8.11) && !flag(ghc-lib))
57-
hs-source-dirs: src-ghc810
58-
exposed-modules:
59-
Compat.HieAst
60-
Compat.HieBin
61-
62-
if (impl(ghc > 8.7) && impl(ghc < 8.11) && !flag(ghc-lib))
63-
reexported-modules:
64-
HieTypes as Compat.HieTypes,
65-
HieDebug as Compat.HieDebug,
66-
HieUtils as Compat.HieUtils
41+
if ((impl(ghc > 8.7) && impl(ghc < 8.10)) || flag(ghc-lib))
42+
hs-source-dirs: src-ghc88 src-reexport
43+
if (impl(ghc > 8.9) && impl(ghc < 8.11))
44+
hs-source-dirs: src-ghc810 src-reexport
6745

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module Compat.HieDebug
2+
( module HieDebug ) where
3+
import HieDebug
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module Compat.HieTypes
2+
( module HieTypes ) where
3+
import HieTypes
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module Compat.HieUtils
2+
( module HieUtils ) where
3+
import HieUtils

0 commit comments

Comments
 (0)