Safe Haskell | None |
---|---|
Language | Haskell98 |
The pseudo-macros in this module are meant to be used via Template Haskell (see http://www.haskell.org/ghc/docs/latest/html/users_guide/template-haskell.html for more information).
Example:
{-# LANGUAGE TemplateHaskell #-} import PseudoMacros main :: IO () main = putStrLn ("Hello from " ++ $__FILE__ ++ ", line " ++ show $__LINE__ ++ "!")
That is, enable the TemplateHaskell
extension and put a $
before each
pseudo-macro.
Documentation
__MODULE__ :: Q Exp Source
A string containing the current module name.
__PACKAGE__ :: Q Exp Source
A string containing the current package name.