haskell-suite / haskell-src-exts

Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer
Other
193 stars 94 forks source link

Adapt to the Semigroup–Monoid Proposal #394

Closed RyanGlScott closed 6 years ago

RyanGlScott commented 6 years ago

Now that Semigroup is a superclass of Monoid (and exported by the Prelude) in GHC 8.4, some minor changes have to be made to haskell-src-exts's internals to make it compile.

k-bx commented 6 years ago

You can just do:

  if !impl(ghc >= 8.0)
    build-depends:
      semigroups >= 0.11 && < 0.19

in cabal file and won't need any CPP magic

k-bx commented 6 years ago

Actually, sorry, that might not quite help in the superclass case

mpickering commented 6 years ago

I merged a slightly modified version. Thanks.