references-0.1.0.0: Generalization of lenses, folds and traversals to handle monads and addition.

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

typeVariables :: Simple Traversal Type Name

Reference all type variables inside a type

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.

conName :: Simple Lens Con Name

Reference the name of the constructor

funApplication :: Simple Lens 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.