Safe Haskell | Unsafe |
---|---|
Language | Haskell2010 |
Test.Expr.Utils
Description
Miscellaneous utilities for Template Haskell and other.
(c) 2018 Vladimír Štill
Synopsis
- apply :: Name -> [Exp] -> Exp
- apply' :: Exp -> [Exp] -> Exp
- dbg_ :: Ppr a => Q a -> Q a
- showQ :: Show a => Q a -> Q Exp
- showQ' :: Show a => a -> Q Exp
- pfail :: String -> Q Exp
- spliceModule :: Q String
- spliceFileLoc :: Q String
Template Haskell Utilities
apply :: Name -> [Exp] -> Exp #
Create a function application expression calling given function with given arguments.
showQ :: Show a => Q a -> Q Exp #
Show string representation of template haskell expression, such as AST:
$(showQ [| x -> x |])
This is useful to see how the code is represented
showQ' :: Show a => a -> Q Exp #
Show string representation of template haskell expression without Q
Monad, such as names:
$(showQ' 'id)
This is useful to see how the code is represented
Other Utilities
spliceModule :: Q String #
spliceFileLoc :: Q String #