@@ -29,11 +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
33+#if MIN_VERSION_template_haskell(2,10,0)
34+ , conT
35+ , appT
36+#else
37+ , classP
3438#endif
3539 , varT
36− , classP
3740 -- Lifted constructors
3841 -- .. Literals
3942 , stringL
@@ -71,10 +74,6 @@ import Control.Distributed.Process.Serializable
7174 )
7275import Control.Distributed.Process.Internal.Closure.BuiltIn (staticDecode)
7376
74−#if MIN_VERSION_template_haskell(2,10,0)
75−type Pred = Type
76−#endif
77−
7877--------------------------------------------------------------------------------
7978-- User-level API --
8079--------------------------------------------------------------------------------
@@ -261,7 +260,12 @@ generateStatic n xs typ = do
261260 ]
262261 where
263262 typeable :: TyVarBndr -> Q Pred
264− typeable tv = classP (mkName "Typeable") [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
265269
266270-- | Generate a serialization dictionary with name 'n' for type 'typ'
267271generateDict :: Name -> Type -> Q [Dec]