Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Names of the various things we generate
This is used by both TH code generation and the quasi-quoter.
Synopsis
- nameRecordInternalConstr :: String -> String
- nameRecordTypedConstructorFn :: String -> String
- nameRecordConstraintsClass :: String -> String
- nameRecordConstraintsMethod :: String -> String
- nameRecordIndexedAccessor :: String -> String
- nameRecordIndexedOverwrite :: String -> String
- nameRecordInternalField :: String -> String
- nameRecordView :: String -> String
Names based on the constructor
nameRecordInternalConstr :: String -> String Source #
The name of the constructor used internally
We must pick this so that
- It is different from the user-written constructor (so that we can use that name for the pattern synonym, if we generate it)
- It is derivable from the user-written constructor, so that in, say,
[lr| MkR { x = 5, y = True } |]
the quasi-quoter can figure out the name of the internal constructor (provided that the constructor is in scope, but that's a reasonable requirement).
nameRecordTypedConstructorFn :: String -> String Source #
Name of the record constructor function
Unlike the internal constructor (which takes a Vector Any
as argument),
this function takes n
arguments, one for each record field, of the
appropriate types.
Names based on the type
nameRecordView :: String -> String Source #