th-desugar-1.10: Functions to desugar Template Haskell
Copyright(C) 2014 Richard Eisenberg
LicenseBSD-style (see LICENSE)
MaintainerRyan Scott
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Language.Haskell.TH.Desugar.Sweeten

Description

The functions in this module convert desugared Template Haskell back into proper Template Haskell.

Synopsis

Documentation

expToTH :: DExp -> Exp Source #

matchToTH :: DMatch -> Match Source #

patToTH :: DPat -> Pat Source #

decsToTH :: [DDec] -> [Dec] Source #

decToTH :: DDec -> [Dec] Source #

This returns a list of Decs because GHC 7.6.3 does not have a one-to-one mapping between DDec and Dec.

letDecToTH :: DLetDec -> Maybe Dec Source #

Note: This can currently only return a Nothing if the DLetDec is a pragma which is not supported by the GHC version being used.

typeToTH :: DType -> Type Source #

conToTH :: DCon -> Con Source #

pragmaToTH :: DPragma -> Maybe Pragma Source #

clauseToTH :: DClause -> Clause Source #

tvbToTH :: DTyVarBndr -> TyVarBndr Source #

cxtToTH :: DCxt -> Cxt Source #

predToTH :: DPred -> Pred Source #

derivClauseToTH :: DDerivClause -> [DerivClause] Source #