th-desugar-1.2.1: 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 :: (Quasi q, 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 :: Quasi q => DType -> q DTypeSource

Expands all type synonyms in a desugared type.

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

Capture-avoiding substitution on types