records-th-0.1.1.0: Template Haskell declarations for the records package

Safe HaskellNone

Data.Record.TH

Synopsis

Documentation

data JSONSpec Source

Specify what level of JSON generation you want

Constructors

ALL 
TO 
FROM 
NONE 

Instances

fields :: [(String, TypeQ, JSONSpec)] -> Q [Dec]Source

Generate field declarations for the given strings. For example: $(fields [A, B]) generates the code data A = A instance Name A where name = A

type Field a = a ::: TypeOf aSource

A field representing its TypeOf

type Rec a = a (Id KindStar)Source

A record using the Id type function as its sort

type family TypeOf c Source

The data carried by a particular field name