references-0.3.2.1: 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 #

Reference all type variables inside a type

typeVar :: Simple Partial Type Name #

Reference the name of the type variable

typeVariables :: Simple Traversal Type Type #

Reference all type variables inside a type

freeTypeVariables :: Simple Traversal Type Type #

Reference all type variables not binded by a forall

typeVarName :: Simple Lens TyVarBndr Name #

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

nameBaseStr :: Simple Lens Name String #

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)] #

Reference the record fields in a constructor.

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

Reference all fields (data members) in a constructor.

conTypes :: Simple Traversal Con Type #

Reference types of fields

conName :: Simple Lens Con Name #

Reference the name of the constructor

funApplication :: Simple Iso Exp [Exp] #

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 #

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

definedConstructors :: Simple Partial Dec [Con] #

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] #

Accesses the type variables of a definition