hsExprTest-3.6.5: Expression Testing
Safe HaskellUnsafe
LanguageHaskell2010

Test.Expr.Utils

Description

Miscellaneous utilities for Template Haskell and other.

(c) 2018 Vladimír Štill

Synopsis

Template Haskell Utilities

apply :: Name -> [Exp] -> Exp #

Create a function application expression calling given function with given arguments.

apply' :: Exp -> [Exp] -> Exp #

Like apply, but function is given as an expression.

dbg_ :: Ppr a => Q a -> Q a #

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

pfail :: String -> Q Exp #

spliceModule :: Q String #

spliceFileLoc :: Q String #