Allow NFData instances for NExpr and NExprLoc on GHC 8.0
This commit is contained in:
parent
b59d6fd62e
commit
e06ab95236
|
@ -428,6 +428,10 @@ paramName :: Params r -> Maybe VarName
|
|||
paramName (Param n) = Just n
|
||||
paramName (ParamSet _ _ n) = n
|
||||
|
||||
#if !MIN_VERSION_deepseq(1, 4, 3)
|
||||
instance NFData NExpr
|
||||
#endif
|
||||
|
||||
$(deriveEq1 ''NExprF)
|
||||
$(deriveEq1 ''NString)
|
||||
$(deriveEq1 ''Binding)
|
||||
|
|
|
@ -108,11 +108,12 @@ type NExprLocF = AnnF SrcSpan NExprF
|
|||
-- | A nix expression with source location at each subexpression.
|
||||
type NExprLoc = Fix NExprLocF
|
||||
|
||||
#if MIN_VERSION_hashable(1, 2, 5) && MIN_VERSION_deepseq(1, 4, 3)
|
||||
-- Needs deepseq-1.4.3 because Compose requires NFData1
|
||||
instance NFData NExprLoc
|
||||
#if !MIN_VERSION_deepseq(1, 4, 3)
|
||||
instance (NFData (f (g a)), NFData (g a)) => NFData (Compose f g a)
|
||||
#endif
|
||||
|
||||
instance NFData NExprLoc
|
||||
|
||||
#if MIN_VERSION_serialise(0, 2, 0)
|
||||
instance Serialise NExprLoc
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue