@@ -29,11 +29,14 @@ import Language.Haskell.TH
29 , Type(AppT, ForallT, VarT, ArrowT)
29 , Type(AppT, ForallT, VarT, ArrowT)
30 , Info(VarI)
30 , Info(VarI)
31 , TyVarBndr(PlainTV, KindedTV)
31 , TyVarBndr(PlainTV, KindedTV)
32−#if ! MIN_VERSION_template_haskell(2,10,0)
33+#if MIN_VERSION_template_haskell(2,10,0)
37 -- Lifted constructors
40 -- Lifted constructors
38 -- .. Literals
41 -- .. Literals
@@ -71,10 +74,6 @@ import Control.Distributed.Process.Serializable
72import Control.Distributed.Process.Internal.Closure.BuiltIn (staticDecode)
75import Control.Distributed.Process.Internal.Closure.BuiltIn (staticDecode)
74−#if MIN_VERSION_template_haskell(2,10,0)
78--------------------------------------------------------------------------------
77--------------------------------------------------------------------------------
79-- User-level API --
78-- User-level API --
80--------------------------------------------------------------------------------
79--------------------------------------------------------------------------------
@@ -261,7 +260,12 @@ generateStatic n xs typ = do
263 typeable :: TyVarBndr -> Q Pred
262 typeable :: TyVarBndr -> Q Pred
264+#if MIN_VERSION_template_haskell(2,10,0)
265+ conT (mkName "Typeable") `appT` varT (tyVarBndrName tv)
264− typeable tv = classP (mkName "Typeable") [varT (tyVarBndrName tv)]
267+ classP (mkName "Typeable") [varT (tyVarBndrName tv)]
266-- | Generate a serialization dictionary with name 'n' for type 'typ'
270-- | Generate a serialization dictionary with name 'n' for type 'typ'
267generateDict :: Name -> Type -> Q [Dec]
271generateDict :: Name -> Type -> Q [Dec]