pa-ba / compdata

Haskell library implementing "Data Types a la Carte"
http://hackage.haskell.org/package/compdata
Other
89 stars 27 forks source link

Update code to work with GHC 8.2.2 #25

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi, I updated the code to work around the template haskell change in GHC 8.2. Compile error described here: #24

My change just ignores the new DerivStrategy value that is now exposed in template haskell 2.12.0.

I also relaxed the upper bound for QuickCheck to 2.12 (Maybe I should extract this into a separate PR?).

When I ran the tests, they compiled and succeeded. The benchmarks, unfortunately, did not compile successfully. I got the following error. Not really sure what to do about that.

<no location info>: error:
    ghc: panic! (the 'impossible' happened)
  (GHC version 8.2.2 for x86_64-unknown-linux):
    Simplifier ticks exhausted
  When trying RuleFired Class op return
  To increase the limit, use -fsimpl-tick-factor=N (default 100)
  If you need to do this, let GHC HQ know, and what factor you needed
  To see detailed counts use -ddump-simpl-stats
  Total ticks: 267047
  Call stack:
      CallStack (from HasCallStack):
        prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
        callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable
        pprPanic, called at compiler/simplCore/SimplMonad.hs:199:31 in ghc:SimplMonad

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

For GHC 8.0.2 and GHC 7.10.3, everything still worked fine. I used nix to do my testing with multiple compiler versions. I have this branch with the nix derivations I used that you may find useful and that you may or may not want to merge into the project: https://github.com/pa-ba/compdata/compare/master...srdqty:srd-nix?expand=1