th-desugar-1.4.2: Functions to desugar Template Haskell

Portabilitynon-portable
Stabilityexperimental
MaintainerRichard Eisenberg (eir@cis.upenn.edu)
Safe HaskellNone

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 :: (Quasi q, Data a) => a -> q aSource

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 :: Quasi q => DType -> q DTypeSource

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

substTy :: Quasi q => Map Name DType -> DType -> q DTypeSource

Capture-avoiding substitution on types