Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ganeti.THH.Compat
Description
Shim library for supporting various Template Haskell versions
Synopsis
- gntInstanceD :: Cxt -> Type -> [Dec] -> Dec
- gntDataD :: Cxt -> Name -> [TyVarBndr ()] -> [Con] -> [Name] -> Dec
- extractDataDConstructors :: Info -> Maybe [Con]
- myNotStrict :: Bang
- nonUnaryTupE :: [Exp] -> Exp
- mkDoE :: [Stmt] -> Exp
- conP_ :: Name -> [Pat] -> Pat
Documentation
gntInstanceD :: Cxt -> Type -> [Dec] -> Dec #
InstanceD "constructor" function
Handle TH 2.11 and 2.12 changes in a transparent manner using the pre-2.11 API.
gntDataD :: Cxt -> Name -> [TyVarBndr ()] -> [Con] -> [Name] -> Dec #
DataD "constructor" function
Handle TH 2.11 and 2.12 changes in a transparent manner using the pre-2.11 API.
extractDataDConstructors :: Info -> Maybe [Con] #
Extract constructors from a DataD instance
Handle TH 2.11 changes by abstracting pattern matching against DataD.
myNotStrict :: Bang #
Strict has been replaced by Bang, so redefine NotStrict in terms of the latter.
nonUnaryTupE :: [Exp] -> Exp #
TupE changed from '[Exp] -> Exp' to '[Maybe Exp] -> Exp'. Provide the old signature for compatibility.