haskell-src-exts-simple-1.19.0.0: A simplified view on the haskell-src-exts AST

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Exts.Simple.Parser

Contents

Description

This module reexports Language.Haskell.Exts.Parser with adaptations.

IMPORTANT: if you require compatiblity with ghc 7.8, you should use the function listOf for constructing ListOf values!

Synopsis

Datatypes and Constructors

ListOf

type ListOf = ListOf Source #

Beware that the ListOf constructor only works in a pattern context in ghc-7.8, because that version does not support explicitly bidirectional pattern synonyms.

For code that needs to work with ghc-7.8, we provide the listOf function constructing ListOf values.

pattern ListOf :: forall t. [t] -> ListOf t Source #

listOf :: [a] -> ListOf a Source #

PragmasAndModuleName

type PragmasAndModuleName = PragmasAndModuleName () Source #

PragmasAndModuleHead

type PragmasAndModuleHead = PragmasAndModuleHead () Source #

pattern PragmasAndModuleHead :: [ModulePragma] -> Maybe ModuleHead -> PragmasAndModuleHead () Source #

ModuleHeadAndImports

type ModuleHeadAndImports = ModuleHeadAndImports () Source #

pattern ModuleHeadAndImports :: [ModulePragma] -> Maybe ModuleHead -> [ImportDecl] -> ModuleHeadAndImports () Source #

Functions

parse :: (Parseable (ast SrcSpanInfo), Functor ast) => String -> ParseResult (ast ()) Source #

parseWithMode :: (Parseable (ast SrcSpanInfo), Functor ast) => ParseMode -> String -> ParseResult (ast ()) Source #

parseModule :: String -> ParseResult Module Source #

parseModuleWithMode :: ParseMode -> String -> ParseResult Module Source #

parseExp :: String -> ParseResult Exp Source #

parseExpWithMode :: ParseMode -> String -> ParseResult Exp Source #

parseStmt :: String -> ParseResult Stmt Source #

parseStmtWithMode :: ParseMode -> String -> ParseResult Stmt Source #

parsePat :: String -> ParseResult Pat Source #

parsePatWithMode :: ParseMode -> String -> ParseResult Pat Source #

parseDecl :: String -> ParseResult Decl Source #

parseDeclWithMode :: ParseMode -> String -> ParseResult Decl Source #

parseType :: String -> ParseResult Type Source #

parseTypeWithMode :: ParseMode -> String -> ParseResult Type Source #

parseImportDeclWithMode :: ParseMode -> String -> ParseResult ImportDecl Source #