summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-forensics/quickfuzz/files/quickfuzz-9999-th-2.11-2.patch')
-rw-r--r--app-forensics/quickfuzz/files/quickfuzz-9999-th-2.11-2.patch87
1 files changed, 87 insertions, 0 deletions
diff --git a/app-forensics/quickfuzz/files/quickfuzz-9999-th-2.11-2.patch b/app-forensics/quickfuzz/files/quickfuzz-9999-th-2.11-2.patch
new file mode 100644
index 000000000000..5ac7f4de719d
--- /dev/null
+++ b/app-forensics/quickfuzz/files/quickfuzz-9999-th-2.11-2.patch
@@ -0,0 +1,87 @@
+diff --git a/src/DeriveArbitrary.hs b/src/DeriveArbitrary.hs
+index fc94945..6f2d77f 100644
+--- a/src/DeriveArbitrary.hs
++++ b/src/DeriveArbitrary.hs
+@@ -3,2 +3,3 @@
+ {-# LANGUAGE LambdaCase #-}
++{-# LANGUAGE CPP #-}
+ module DeriveArbitrary (
+@@ -39,2 +40,8 @@ import Data.List
+
++#if MIN_VERSION_template_haskell(2,11,0)
++# define TH211MBKIND _maybe_kind
++#else
++# define TH211MBKIND
++#endif
++
+ -- | Build the arbitrary function with makeArbs
+@@ -80,3 +87,3 @@ deriveArbitrary t = do
+ case inf of
+- TyConI (DataD _ _ params constructors _) -> do
++ TyConI (DataD _ _ params TH211MBKIND constructors _) -> do
+ let ns = map varT $ paramNames params
+@@ -111,3 +118,3 @@ deriveArbitrary t = do
+ where go n = $(gos 'go 'n)|]
+- TyConI (NewtypeD _ _ params con _) -> do
++ TyConI (NewtypeD _ _ params TH211MBKIND con _) -> do
+ let ns = map varT $ paramNames params
+@@ -281,3 +288,3 @@ customG name = do
+
+- TyConI (DataD _ _ params constructors _) ->
++ TyConI (DataD _ _ params TH211MBKIND constructors _) ->
+ let fnm = mkName "prob_gen" -- "customGen_" ++ (map (\x -> if x == '.' then '_' else
+diff --git a/src/DeriveFixable.hs b/src/DeriveFixable.hs
+index ec8b8be..83593e6 100644
+--- a/src/DeriveFixable.hs
++++ b/src/DeriveFixable.hs
+@@ -1,2 +1,3 @@
+ {-# Language TemplateHaskell, ConstraintKinds, FlexibleInstances, FlexibleContexts, IncoherentInstances, MultiParamTypeClasses #-}
++{-# Language CPP #-}
+
+@@ -15,2 +16,8 @@ import Control.Monad.Trans.State
+
++#if MIN_VERSION_template_haskell(2,11,0)
++# define TH211MBKIND _maybe_kind
++#else
++# define TH211MBKIND
++#endif
++
+ --The state is composed of identifiers
+@@ -147,3 +154,3 @@ mkFix i v a t = do ti <- reify t
+ case ti of
+- TyConI (DataD _ _ params tcons _) -> do
++ TyConI (DataD _ _ params TH211MBKIND tcons _) -> do
+ let cstuff = map getStuff tcons
+@@ -155,3 +162,3 @@ mkFix i v a t = do ti <- reify t
+ case ii of
+- TyConI (DataD _ _ ip _ _) -> do
++ TyConI (DataD _ _ ip TH211MBKIND _ _) -> do
+ let ivars = map (varT . getParName) ip
+@@ -180,3 +187,3 @@ mkFix i v a t = do ti <- reify t
+ gg = $(mkFixBody matches) |]
+- TyConI (NewtypeD _ _ ip _ _) -> do
++ TyConI (NewtypeD _ _ ip TH211MBKIND _ _) -> do
+ let ivars = map (varT . getParName) ip
+diff --git a/src/DeriveMutation.hs b/src/DeriveMutation.hs
+index ae58345..7494c50 100644
+--- a/src/DeriveMutation.hs
++++ b/src/DeriveMutation.hs
+@@ -3,2 +3,3 @@
+ {-# LANGUAGE FlexibleInstances,UndecidableInstances#-}
++{-# LANGUAGE CPP #-}
+ module DeriveMutation where
+@@ -17,2 +18,9 @@ import Data.List
+ import Megadeth.Prim
++
++#if MIN_VERSION_template_haskell(2,11,0)
++# define TH211MBKIND _maybe_kind
++#else
++# define TH211MBKIND
++#endif
++
+ --import Mutation
+@@ -100,3 +108,3 @@ devMutation name customGen = do
+ TyConI (TySynD _ _ ty) -> return [] -- devMutation (headOf ty) Nothing
+- TyConI (DataD _ _ params constructors _) -> do
++ TyConI (DataD _ _ params TH211MBKIND constructors _) -> do
+ let fnm = mkName $ "mutt" -- ++ (showName name)