Safe Haskell | None |
---|---|
Language | Haskell2010 |
Template Haskell names and values.
- nameT :: Name
- nameA :: Name
- nameR :: Name
- typeT :: TypeQ
- typeA :: TypeQ
- typeR :: TypeQ
- tyVarBndrT :: TyVarBndr
- tyVarBndrA :: TyVarBndr
- tyVarBndrR :: TyVarBndr
- productionsStr :: String
- productions :: Name
- recordName :: String -> Name
- qualRecordName :: Qualifier -> String -> String
- newtype Namer a = Namer (StateT (Map String Name) Q a)
- liftQ :: Q a -> Namer a
- namerNewName :: Namer Name
- runNamer :: Namer a -> Q a
- getName :: String -> Namer Name
- lookupValueName :: String -> Q Name
- lookupTypeName :: String -> Q Name
- type Qualifier = String
- quald :: Qualifier -> String -> String
Documentation
tyVarBndrT :: TyVarBndr Source #
t
as a TyVarBndr
tyVarBndrA :: TyVarBndr Source #
a
as a TyVarBndr
tyVarBndrR :: TyVarBndr Source #
r
as a TyVarBndr
productions :: Name Source #
Productions
recordName :: String -> Name Source #
a'
followed by the given string.
Environment for the creation of new names. Each name is
associated with an arbitrary String. Useful for assigning a new
unique name to match a particular Pinchot identifier. Use
getName
to get the name associated with a particular identifier,
creating it if necessary.
namerNewName :: Namer Name Source #
getName :: String -> Namer Name Source #
Get th Name that corresponds to a particular string. If necessary, creates the name.
type Qualifier = String Source #
Many functions take an argument that holds the name qualifier
for the module that contains the data types created by applying a
function such as syntaxTrees
or
earleyProduct
.
You will have to make sure that these data types are in scope.
The spliced Template Haskell code has to know where to
look for these data types. If you did an unqualified import
or
if the types are in the same module as the function that takes a
Qualifier
argument, just pass the empty string here. If you did a
qualified import, use the appropriate qualifier here.
For example, if you used import qualified MyAst
, pass
"MyAst"
here. If you used import qualified
Data.MyLibrary.MyAst as MyLibrary.MyAst
, pass
"MyLibrary.MyAst"
here.