Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides combinators for constructing Haskell modules, including import and export statements.
Synopsis
- type HsModule' = HsModule GhcPs
- module' :: Maybe ModuleNameStr -> Maybe [IE'] -> [ImportDecl'] -> [HsDecl'] -> HsModule'
- type ImportDecl' = ImportDecl GhcPs
- qualified' :: ImportDecl' -> ImportDecl'
- as' :: ImportDecl' -> ModuleNameStr -> ImportDecl'
- import' :: ModuleNameStr -> ImportDecl'
- exposing :: ImportDecl' -> [IE'] -> ImportDecl'
- hiding :: ImportDecl' -> [IE'] -> ImportDecl'
- source :: ImportDecl' -> ImportDecl'
- type IE' = IE GhcPs
- thingAll :: RdrNameStr -> IE'
- thingWith :: RdrNameStr -> [OccNameStr] -> IE'
- moduleContents :: ModuleNameStr -> IE'
HsModule'
:: Maybe ModuleNameStr | |
-> Maybe [IE'] | Exports |
-> [ImportDecl'] | |
-> [HsDecl'] | |
-> HsModule' |
Import declarations
type ImportDecl' = ImportDecl GhcPs Source #
qualified' :: ImportDecl' -> ImportDecl' Source #
as' :: ImportDecl' -> ModuleNameStr -> ImportDecl' Source #
import' :: ModuleNameStr -> ImportDecl' Source #
exposing :: ImportDecl' -> [IE'] -> ImportDecl' Source #
hiding :: ImportDecl' -> [IE'] -> ImportDecl' Source #
source :: ImportDecl' -> ImportDecl' Source #
Imported/exported things
thingAll :: RdrNameStr -> IE' Source #
Exports all methods and/or constructors.
A(..) ===== thingAll "A"
thingWith :: RdrNameStr -> [OccNameStr] -> IE' Source #
Exports specific methods and/or constructors.
A(b, C) ===== thingWith "A" ["b", "C"]
moduleContents :: ModuleNameStr -> IE' Source #
Exports an entire module.
Note: this is not valid inside of an import list.
module M ===== moduleContents "M"