th-desugar-1.15: Functions to desugar Template Haskell

Copyright | (C) 2014 Richard Eisenberg
License | BSD-style (see LICENSE)
Maintainer | Ryan Scott
Stability | experimental
Portability | non-portable
Safe Haskell | Safe-Inferred
Language | Haskell2010

Language.Haskell.TH.Desugar.Sweeten

Description

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

Synopsis

- expToTH :: DExp -> Exp
- matchToTH :: DMatch -> Match
- patToTH :: DPat -> Pat
- decsToTH :: [DDec] -> [Dec]
- decToTH :: DDec -> Dec
- letDecToTH :: DLetDec -> Dec
- typeToTH :: DType -> Type
- conToTH :: DCon -> Con
- foreignToTH :: DForeign -> Foreign
- pragmaToTH :: DPragma -> Pragma
- ruleBndrToTH :: DRuleBndr -> RuleBndr
- clauseToTH :: DClause -> Clause
- tvbToTH :: DTyVarBndr flag -> TyVarBndr_ flag
- cxtToTH :: DCxt -> Cxt
- predToTH :: DPred -> Pred
- derivClauseToTH :: DDerivClause -> [DerivClause]
- patSynDirToTH :: DPatSynDir -> PatSynDir
- typeArgToTH :: DTypeArg -> TypeArg

# 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 `Dec`s because GHC 7.6.3 does not have a one-to-one mapping between `DDec` and `Dec`.

letDecToTH :: DLetDec -> Dec Source #

Sweeten a `DLetDec`.

typeToTH :: DType -> Type Source #

conToTH :: DCon -> Con Source #

foreignToTH :: DForeign -> Foreign Source #

pragmaToTH :: DPragma -> Pragma Source #

ruleBndrToTH :: DRuleBndr -> RuleBndr Source #

clauseToTH :: DClause -> Clause Source #

tvbToTH :: DTyVarBndr flag -> TyVarBndr_ flag Source #

cxtToTH :: DCxt -> Cxt Source #

predToTH :: DPred -> Pred Source #

derivClauseToTH :: DDerivClause -> [DerivClause] Source #

patSynDirToTH :: DPatSynDir -> PatSynDir Source #

typeArgToTH :: DTypeArg -> TypeArg Source #