large-records-0.1.0.0: Efficient compilation for large records, linear in the size of the record
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Record.Internal.Naming

Description

Names of the various things we generate

This is used by both TH code generation and the quasi-quoter.

Synopsis

Names based on the constructor

nameRecordInternalConstr :: String -> String Source #

The name of the constructor used internally

We must pick this so that

  1. It is different from the user-written constructor (so that we can use that name for the pattern synonym, if we generate it)
  2. 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