haskell-src-exts-0.4.5: Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer

Portabilityportable
Stabilityexperimental
MaintainerNiklas Broberg, d00nibro@dtek.chalmers.se

Language.Haskell.Exts.Parser

Description

 

Synopsis

Documentation

parseModule :: String -> ParseResult ModuleSource

Parse of a string, which should contain a complete Haskell 98 module.

parseModuleWithMode :: ParseMode -> String -> ParseResult ModuleSource

Parse of a string, which should contain a complete Haskell 98 module.

data ParseMode Source

Static parameters governing a parse. More to come later, e.g. literate mode, language extensions.

Constructors

ParseMode 

Fields

parseFilename :: String

original name of the file being parsed

defaultParseMode :: ParseModeSource

Default parameters for a parse, currently just a marker for an unknown filename.

data ParseResult a Source

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

Show a => Show (ParseResult a)