Language.Haskell.Parser

| haskell-src-1.0.1.4: Support for manipulating Haskell source code | Contents | Index
Language.Haskell.Parser |
Portability | portable
Stability | experimental
Maintainer | libraries@haskell.org
Description
Haskell parser.
Synopsis
parseModule :: String -> ParseResult HsModule
parseModuleWithMode :: ParseMode -> String -> ParseResult HsModule
data ParseMode = ParseMode {
parseFilename :: String
}
defaultParseMode :: ParseMode
data ParseResult a
= ParseOk a
| ParseFailed SrcLoc String
Documentation
parseModule :: String -> ParseResult HsModule
Parse of a string, which should contain a complete Haskell 98 module.
parseModuleWithMode :: ParseMode -> String -> ParseResult HsModule
Parse of a string, which should contain a complete Haskell 98 module.
data ParseMode
Static parameters governing a parse. More to come later, e.g. literate mode, language extensions.
Constructors
ParseMode |
parseFilename :: String | original name of the file being parsed
defaultParseMode :: ParseMode
Default parameters for a parse, currently just a marker for an unknown filename.
data ParseResult a
The result of a parse.
Constructors
ParseOk a | The parse succeeded, yielding a value.
ParseFailed SrcLoc String | The parse failed at the specified source location, with an error message.
Instances
Monad ParseResult |
Functor ParseResult |
Applicative ParseResult |
Show a => Show (ParseResult a) |
Monoid m => Monoid (ParseResult m) |
Produced by Haddock version 2.7.2