template-haskell-natural-1.0.0.0
Safe HaskellNone
LanguageHaskell2010

Language.Haskell.TH.Natural.Syntax.TypeSynonym

Description

Builder for type synonyms

Synopsis

Type

newTypeSynonym :: forall (step :: BuilderStep). String -> TypeSynonymBuilder step 'Ready () -> Q TySynD Source #

Builds a type synonym. The first argument is the name of the type synonym

type TypeSynonymBuilder (prev :: k) (next :: k) a = Builder TypeSynonymBuilderState prev next a Source #

Functions

addTypeVar :: forall {k} s (step :: k). HasTyVarBndr s [TyVarBndr BndrVis] => TypeVarName -> Builder s step step () Source #

Add the type variable to the tyVarBndr list

addTypeVar' :: forall {k} s vis (step :: k). HasTyVarBndr s [TyVarBndr vis] => TypeVarName -> vis -> Maybe Kind -> Builder s step step () Source #

Same as addTypeVar, but allows setting the kind and vis of the type variable

returns :: forall b (step :: BuilderStep). GenType b => b -> TypeSynonymBuilder step 'Ready () Source #

Sets the RHS of the type synonym definition

Lenses