modulespection-0.1.2.1: Template Haskell for introspecting a module's declarations

Safe HaskellNone

Language.Haskell.TH.Module.Magic

Contents

Synopsis

Name Introspection

names :: Q [Name]Source

Get all the top level declarations of the current file. All names are returned whether they are exported or not.

moduleNames :: String -> Q [Name]Source

Get all the top level names of a given module. If a file path is used, all names, exported and internal are returned. If a module name is used, only the exported names are returned.

Declaration Introspection

declarations :: Q [Dec]Source

Get all the type declarations of the current file. Function and pattern declarations are ignored ... for now.

moduleDeclarations :: String -> Q [Dec]Source

Get all the top level names of a given module. If a file path is used, all names, exported and internal are returned. If a module name is used, only the exported names are returned. Function and pattern declarations are ignored ... for now.