Copyright | (c) Simon Marlow Sven Panne 1997-2000 |
---|---|
License | BSD-style (see the file libraries/base/LICENSE) |
Maintainer | libraries@haskell.org |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
Haskell parser.
- parseModule :: String -> ParseResult HsModule
- parseModuleWithMode :: ParseMode -> String -> ParseResult HsModule
- data ParseMode = ParseMode {}
- defaultParseMode :: ParseMode
- data ParseResult a
- = ParseOk a
- | ParseFailed SrcLoc String
Documentation
parseModule :: String -> ParseResult HsModule Source #
Parse of a string, which should contain a complete Haskell 98 module.
parseModuleWithMode :: ParseMode -> String -> ParseResult HsModule Source #
Parse of a string, which should contain a complete Haskell 98 module.
Static parameters governing a parse. More to come later, e.g. literate mode, language extensions.
ParseMode | |
|
defaultParseMode :: ParseMode Source #
Default parameters for a parse, currently just a marker for an unknown filename.
data ParseResult a Source #
The result of a parse.
ParseOk a | The parse succeeded, yielding a value. |
ParseFailed SrcLoc String | The parse failed at the specified source location, with an error message. |
Monad ParseResult Source # | |
Functor ParseResult Source # | |
Applicative ParseResult Source # | |
Show a => Show (ParseResult a) Source # | |
Monoid m => Semigroup (ParseResult m) Source # | Since: 1.0.3.0 |
Monoid m => Monoid (ParseResult m) Source # | |