| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Data.Generics.Record
Documentation
A phantom type used to parameterize functions based on records.
This let's us avoid passing undefineds or manually creating instances
all the time. It can only be created for types which are records and
is used as a token to most of the API's functions.
isRecord :: forall a. Data a => a -> Bool Source
Returns True if a is a data type with a single constructor
and is a record. a may be bottom.
recordT :: forall a. Data a => Maybe (RecordT a) Source
The smart constructor for RecordTs. This
will return a RecordT if and only if the type is a record.
emptyRecord :: forall a. Data a => RecordT a -> a Source
Return a record where all fields are _|_