emilaxelsson / syntactic

Generic representation and manipulation of abstract syntax
BSD 3-Clause "New" or "Revised" License
25 stars 13 forks source link

Compile failure with GHC 7.4.2 #32

Closed hvr closed 7 years ago

hvr commented 7 years ago

See below

Configuring component lib from syntactic-3.6.2
Preprocessing library syntactic-3.6.2...
[ 1 of 20] Compiling Language.Syntactic.Syntax ( src/Language/Syntactic/Syntax.hs, /tmp/matrix-worker/1480524307/dist-newstyle/build/x86_64-linux/ghc-7.4.2/syntactic-3.6.2/build/Language/Syntactic/Syntax.o )

src/Language/Syntactic/Syntax.hs:409:25:
    `sym' is applied to too many type arguments
    In the type signature for `symType':
      symType :: Proxy sym -> sym sig -> sym sig

src/Language/Syntactic/Syntax.hs:413:34:
    Expecting one more argument to `sub'
    In the type signature for `prjP':
      prjP :: Project sub sup => Proxy sub -> sup sig -> Maybe (sub sig)
emilaxelsson commented 7 years ago

So what's the right way to say "does not build on GHC < 7.6"? Is it to set a lower bound on base as in this issue?

hvr commented 7 years ago

Until base becomes reinstallable, it's a reasonable way to use it as a proxy. Semantically somewhat cleaner way would be

if impl(ghc < 7.7)
   build-depends: base<0

as this takes into account the theoretical existence of other Haskell compilers, and says if we use ghc and ghc's version is lower than 7.7...

(and base<0 is simply a contradiction, since there's no negative version numbers)

emilaxelsson commented 7 years ago

OK, I took the simpler option for now.