Closed lambdageek closed 6 years ago
Supporting deepseq sounds like a good idea.
@lambdageek:
Language extensions to .cabal - okay, I updated the PR.
I decided to drop the NFData1
instances.
I didn't realize the NFData1
class is so new.
There are also a few data types in Language.C.Syntax.AST
for which GHC can't derive Generic1
and therefore we can't use the default NFData1
instance. As a result there were only a handful of inconsequential NFData1
instances.
GHC.Generics
is part of base >= 4.6.0.0
(GHC 7.2.1) although the GHC manual for that release mentions that deriving Generic1
didn't work at the time, so that came along later.
We're only testing on Travis as far back as GHC 7.8, but it looks like the .cabal file wants to support some older versions too.
Should I put the Generic instances behind an #ifdef
?
Support for 7.6 (> 5 years ago) or newer seems sufficient, you could also support 7.4 by adding a dependency on ghc-prim (judging from https://hackage.haskell.org/package/deepseq-1.4.3.0/deepseq.cabal). I think #ifdefs are not necessary; if we support a compiler different from GHC at some point (and have a test for it), we can introduce the necessary changes. @lambdageek Could you also remove the splitBase stuff from .cabal? It is no longer needed if we only support 7.x or newer.
Updated.
ghc-prim
for older GHCs, the same way as deepseq
splitBase
flag.
Fixes #48