references-0.3.1.0: Selectors for reading and updating data.

Safe HaskellNone
LanguageHaskell98

Control.Reference.Examples.TH

Description

An example module that adds references for Template Haskell. These references are used to create the TH functions that generate references.

Synopsis

Documentation

typeVariableNames :: Simple Traversal Type Name Source #

Reference all type variables inside a type

typeVar :: Simple Partial Type Name Source #

Reference the name of the type variable

typeVariables :: Simple Traversal Type Type Source #

Reference all type variables inside a type

freeTypeVariables :: Simple Traversal Type Type Source #

Reference all type variables not binded by a forall

typeVarName :: Simple Lens TyVarBndr Name Source #

Reference the name of the type variable inside a type variable binder

nameBaseStr :: Simple Lens Name String Source #

Reference the characters of the name. If changed there is no guarantee that the created name will be unique.

recFields :: Simple Partial Con [(Name, Strict, Type)] Source #

Reference the record fields in a constructor.

conFields :: Simple Lens Con [(Strict, Type)] Source #

Reference all fields (data members) in a constructor.

conTypes :: Simple Traversal Con Type Source #

Reference types of fields

conName :: Simple Lens Con Name Source #

Reference the name of the constructor

funApplication :: Simple Iso Exp [Exp] Source #

Access a function application as a list of expressions with the function application at the head of the list and the arguments on it's tail.

definedName :: Simple Partial Dec Name Source #

Accesses the name of the defined object. Does not return name in signatures.

definedConstructors :: Simple Partial Dec [Con] Source #

Accesses the constructors of a data or newtype definition. After changing the definition becames a newtype if there is only one constructor.

definedTypeArgs :: Simple Partial Dec [TyVarBndr] Source #

Accesses the type variables of a definition