Safe Haskell | None |
---|
The functions in this module convert desugared Template Haskell back into proper Template Haskell.
- expToTH :: DExp -> Exp
- matchToTH :: DMatch -> Match
- patToTH :: DPat -> Pat
- decsToTH :: [DDec] -> [Dec]
- decToTH :: DDec -> [Dec]
- letDecToTH :: DLetDec -> Dec
- conToTH :: DCon -> Con
- foreignToTH :: DForeign -> Foreign
- pragmaToTH :: DPragma -> Maybe Pragma
- ruleBndrToTH :: DRuleBndr -> RuleBndr
- tySynEqnToTHDec :: Name -> DTySynEqn -> Dec
- clauseToTH :: DClause -> Clause
- typeToTH :: DType -> Type
- tvbToTH :: DTyVarBndr -> TyVarBndr
- cxtToTH :: DCxt -> Cxt
- predToTH :: DPred -> Pred
- kindToTH :: DKind -> Kind
Documentation
decToTH :: DDec -> [Dec]Source
This returns a list of Dec
s because GHC 7.6.3 does not have
a one-to-one mapping between DDec
and Dec
.
letDecToTH :: DLetDec -> DecSource
foreignToTH :: DForeign -> ForeignSource
pragmaToTH :: DPragma -> Maybe PragmaSource
tySynEqnToTHDec :: Name -> DTySynEqn -> DecSource
GHC 7.6.3 doesn't have TySynEqn, so we sweeten to a Dec in GHC 7.6.3; GHC 7.8+ does not use this function
clauseToTH :: DClause -> ClauseSource
tvbToTH :: DTyVarBndr -> TyVarBndrSource