| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Language.Haskell.Tools.Refactor.GenerateExports
- generateExports :: NamedThing n => Ann Module (STWithNames n) -> RefactoredModule n
- getTopLevels :: Ann Module (STWithNames n) -> [(n, Bool)]
- getTopLevelDeclName :: Decl (NodeInfo (SemanticInfo n) src) -> Maybe n
- createExports :: NamedThing n => [(n, Bool)] -> Ann ExportSpecList (STWithNames n)
Documentation
generateExports :: NamedThing n => Ann Module (STWithNames n) -> RefactoredModule n Source #
Creates an export list that imports standalone top-level definitions with all of their contained definitions
getTopLevels :: Ann Module (STWithNames n) -> [(n, Bool)] Source #
Get all the top-level definitions with flags that mark if they can contain other top-level definitions (classes and data declarations).
getTopLevelDeclName :: Decl (NodeInfo (SemanticInfo n) src) -> Maybe n Source #
Get all the standalone top level definitions (their GHC unique names) in a module. You could also do getting all the names with a biplate reference and select the top-level ones, but this is more efficient.
createExports :: NamedThing n => [(n, Bool)] -> Ann ExportSpecList (STWithNames n) Source #
Create the export for a give name.