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

Safe HaskellNone

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 NameSource

Reference all type variables inside a type

typeVarName :: Simple Lens TyVarBndr NameSource

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

nameBaseStr :: Simple Lens Name StringSource

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.

conName :: Simple Lens Con NameSource

Reference the name of the constructor

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