Safe Haskell | None |
---|---|
Language | Haskell2010 |
Getting declarations from PureScript sourcefiles
Synopsis
- parseModule :: (MonadIO m, MonadError IdeError m) => FilePath -> m (Either FilePath (FilePath, Module))
- parseModulesFromFiles :: (MonadIO m, MonadError IdeError m) => [FilePath] -> m [Either FilePath (FilePath, Module)]
- extractAstInformation :: Module -> (DefinitionSites SourceSpan, TypeAnnotations)
- extractSpans :: Declaration -> [(IdeNamespaced, SourceSpan)]
- extractTypeAnnotations :: [Declaration] -> [(Ident, SourceType)]
Documentation
parseModule :: (MonadIO m, MonadError IdeError m) => FilePath -> m (Either FilePath (FilePath, Module)) Source #
parseModulesFromFiles :: (MonadIO m, MonadError IdeError m) => [FilePath] -> m [Either FilePath (FilePath, Module)] Source #
extractAstInformation :: Module -> (DefinitionSites SourceSpan, TypeAnnotations) Source #
Extracts AST information from a parsed module
:: Declaration | The declaration to extract spans from |
-> [(IdeNamespaced, SourceSpan)] | Declarations and their source locations |
Given a surrounding Sourcespan and a Declaration from the PS AST, extracts definition sites inside that Declaration.
extractTypeAnnotations :: [Declaration] -> [(Ident, SourceType)] Source #
Extracts type annotations for functions from a given Module