th-desugar-1.5: Functions to desugar Template Haskell

Copyright(C) 2014 Richard Eisenberg
LicenseBSD-style (see LICENSE)
MaintainerRichard Eisenberg (eir@cis.upenn.edu)
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Language.Haskell.TH.Desugar.Expand

Description

Expands type synonyms and open type families in desugared types, ignoring closed type families. See also the package th-expand-syns for doing this to non-desugared types.

Synopsis

Documentation

expand :: (DsMonad q, Data a) => a -> q a Source

Expand all type synonyms and open type families in the desugared abstract syntax tree provided. Normally, the first parameter should have a type like DExp or DLetDec.

expandType :: DsMonad q => DType -> q DType Source

Expands all type synonyms in a desugared type. Also expands open type family applications, as long as the arguments have no free variables.

substTy :: DsMonad q => Map Name DType -> DType -> q DType Source

Capture-avoiding substitution on types