th-desugar-1.1.0: Functions to desugar Template Haskell

Safe HaskellNone

Language.Haskell.TH.Desugar.Expand

Description

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

Synopsis

Documentation

expand :: Data a => a -> Q aSource

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

expandType :: DType -> Q DTypeSource

Expands all type synonyms in a desugared type.

substTy :: Map Name DType -> DType -> Q DTypeSource

Capture-avoiding substitution on types