|
Language.Haskell.Meta.Utils |
|
|
Description |
This module is a staging ground
for to-be-organized-and-merged-nicely code.
|
|
Synopsis |
|
|
|
Documentation |
|
|
|
|
The type passed in must have a Show instance which
produces a valid Haskell expression. Returns an empty
String if this is not the case. This is not TH-specific,
but useful in general.
|
|
|
|
|
|
|
|
|
unQ = unsafePerformIO . runQ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Stolen from Igloo's th-lift.
|
|
|
Produces pretty code suitable
for human consumption.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The arity of a Type.
|
|
|
|
|
Randomly useful.
|
|
|
|
|
|
|
|
|
|
|
|
|
The strategy for producing QuasiQuoters which
this datatype aims to facilitate is as follows.
Given a collection of datatypes which make up
the to-be-quasiquoted languages AST, make each
type in this collection an instance of at least
Show and Lift. Now, assuming parsePat and
parseExp, both of type String -> Q a (where a
is the top level type of the AST), are the pair of
functions you wish to use for parsing in pattern and
expression context respectively, put them inside
a Quoter datatype and pass this to quasify.
| Constructors | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Produced by Haddock version 2.4.2 |