th-typegraph-0.32: Graph of the subtype relation

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.TH.TypeGraph.Vertex

Synopsis

Documentation

class TypeGraphVertex v where Source

Methods

typeNames :: v -> Set Name Source

Return the set of Name of a type's synonyms, plus the name (if any) used in its data declaration. Note that this might return the empty set.

bestType :: v -> Type Source

data TGV Source

A vertex of the type graph. Includes a type and (optionally) what field of a parent type holds that type. This allows special treatment of a type depending on the type that contains it.

Constructors

TGV 

Fields

_field :: Maybe Field

The record field which contains this type

_vsimple :: TGVSimple
 

data TGVSimple Source

For simple type graphs where no parent field information is required.

Constructors

TGVSimple 

Fields

_syns :: Set Name

All the type synonyms that expand to this type

_etype :: E Type

The fully expanded type