@@ -29,12 +29,14 @@ import Language.Haskell.TH
2929 , Type(AppT, ForallT, VarT, ArrowT)
3030 , Info(VarI)
3131 , TyVarBndr(PlainTV, KindedTV)
32−#if ! MIN_VERSION_template_haskell(2,10,0)
3332 , Pred
34−#endif
35− , varT
33+#if MIN_VERSION_template_haskell(2,10,0)
3634 , conT
3735 , appT
36+#else
37+ , classP
38+#endif
39+ , varT
3840 -- Lifted constructors
3941 -- .. Literals
4042 , stringL
@@ -72,10 +74,6 @@ import Control.Distributed.Process.Serializable
7274 )
7375import Control.Distributed.Process.Internal.Closure.BuiltIn (staticDecode)
7476
75−#if MIN_VERSION_template_haskell(2,10,0)
76−type Pred = Type
77−#endif
78−
7977--------------------------------------------------------------------------------
8078-- User-level API --
8179--------------------------------------------------------------------------------
@@ -262,7 +260,12 @@ generateStatic n xs typ = do
262260 ]
263261 where
264262 typeable :: TyVarBndr -> Q Pred
265− typeable tv = conT (mkName "Typeable") `appT` varT (tyVarBndrName tv)
263+ typeable tv =
264+#if MIN_VERSION_template_haskell(2,10,0)
265+ conT (mkName "Typeable") `appT` varT (tyVarBndrName tv)
266+#else
267+ classP (mkName "Typeable") [varT (tyVarBndrName tv)]
268+#endif
266269
267270-- | Generate a serialization dictionary with name 'n' for type 'typ'
268271generateDict :: Name -> Type -> Q [Dec]