@@ -29,12 +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)
34−#endif
33+#if MIN_VERSION_template_haskell(2,10,0)
38 -- Lifted constructors
40 -- Lifted constructors
39 -- .. Literals
41 -- .. Literals
@@ -72,10 +74,6 @@ import Control.Distributed.Process.Serializable
73import Control.Distributed.Process.Internal.Closure.BuiltIn (staticDecode)
75import Control.Distributed.Process.Internal.Closure.BuiltIn (staticDecode)
75−#if MIN_VERSION_template_haskell(2,10,0)
79--------------------------------------------------------------------------------
77--------------------------------------------------------------------------------
80-- User-level API --
78-- User-level API --
81--------------------------------------------------------------------------------
79--------------------------------------------------------------------------------
@@ -262,7 +260,12 @@ generateStatic n xs typ = do
264 typeable :: TyVarBndr -> Q Pred
262 typeable :: TyVarBndr -> Q Pred
264+#if MIN_VERSION_template_haskell(2,10,0)
265− typeable tv = conT (mkName "Typeable") `appT` varT (tyVarBndrName tv)
265+ conT (mkName "Typeable") `appT` varT (tyVarBndrName tv)
267+ classP (mkName "Typeable") [varT (tyVarBndrName tv)]
267-- | Generate a serialization dictionary with name 'n' for type 'typ'
270-- | Generate a serialization dictionary with name 'n' for type 'typ'
268generateDict :: Name -> Type -> Q [Dec]
271generateDict :: Name -> Type -> Q [Dec]