Copyright | 2013 Kei Hibino |
---|---|
License | BSD3 |
Maintainer | ex8k.hibino@gmail.com |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
Language.Haskell.TH.Lib.Extra
Contents
Description
This module provides extra helper functions complementing Language.Haskell.TH.Lib
Extra template functions
Extra functions to generate haskell templates.
simpleValD :: Name -> TypeQ -> ExpQ -> Q [Dec] #
Generate declaration template from name, type and expression.
Pretty printing for Q
monad
Pretty printing for haskell templates.
Functions to print message or errors when compile time
Functions to display or to raise compile messages from codes which generating haskell templates.
Only messages directly generated by Q
monad report actions
are handled by ghc loggers.
-- Handled by ghc logger qReport False "Foo"
-- Not handled by ghc logger runIO . runQ $ qReport False "Foo"
reportWarning :: String -> Q () #
Print compile warnings from TH code.
reportError :: String -> Q () #
Print compile errors from TH code.