Safe Haskell | None |
---|---|
Language | Haskell2010 |
Parsers for module definitions and declarations
- parseDeclaration :: TokenParser [Declaration]
- parseDeclarationRef :: TokenParser DeclarationRef
- parseModule :: TokenParser Module
- parseModuleDeclaration :: TokenParser (ModuleName, Maybe [DeclarationRef])
- parseModulesFromFiles :: forall m k. MonadError MultipleErrors m => (k -> FilePath) -> [(k, Text)] -> m [(k, Module)]
- parseModuleFromFile :: (k -> FilePath) -> (k, Text) -> Either ParseError (k, Module)
- parseValue :: TokenParser Expr
- parseGuard :: TokenParser [Guard]
- parseBinder :: TokenParser Binder
- parseBinderNoParens :: TokenParser Binder
- parseImportDeclaration' :: TokenParser (ModuleName, ImportDeclarationType, Maybe ModuleName)
- parseLocalDeclaration :: TokenParser Declaration
- toPositionedError :: ParseError -> ErrorMessage
Documentation
parseDeclaration :: TokenParser [Declaration] Source #
Parse a single declaration. May include a collection of instances in a chain.
parseModule :: TokenParser Module Source #
Parse a module header and a collection of declarations
parseModuleDeclaration :: TokenParser (ModuleName, Maybe [DeclarationRef]) Source #
Parse a module declaration and its export declarations
parseModulesFromFiles :: forall m k. MonadError MultipleErrors m => (k -> FilePath) -> [(k, Text)] -> m [(k, Module)] Source #
Parse a collection of modules in parallel
parseModuleFromFile :: (k -> FilePath) -> (k, Text) -> Either ParseError (k, Module) Source #
Parses a single module with FilePath for eventual parsing errors
parseValue :: TokenParser Expr Source #
Parse an expression
parseGuard :: TokenParser [Guard] Source #
Parse a guard
parseBinder :: TokenParser Binder Source #
Parse a binder
parseBinderNoParens :: TokenParser Binder Source #
Parse a binder as it would appear in a top level declaration
parseImportDeclaration' :: TokenParser (ModuleName, ImportDeclarationType, Maybe ModuleName) Source #
toPositionedError :: ParseError -> ErrorMessage Source #
Converts a ParseError
into a PositionedError