haskell-tools-refactor-0.2.0.0: Refactoring Tool for Haskell

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.Refactor.GenerateExports

Synopsis

Documentation

generateExports :: DomGenerateExports dom => LocalRefactoring dom Source #

Creates an export list that imports standalone top-level definitions with all of their contained definitions

getTopLevels :: DomGenerateExports dom => Ann Module dom SrcTemplateStage -> [(Name, 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 :: DomGenerateExports dom => Decl dom SrcTemplateStage -> Maybe Name 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 :: DomGenerateExports dom => [(Name, Bool)] -> Ann ExportSpecList dom SrcTemplateStage Source #

Create the export for a give name.