haskell-src-meta-0.8.15: Parse source to template-haskell abstract syntax.

Copyright | (c) Matt Morrow 2008
License | BSD3
Maintainer | Matt Morrow <mjm2002@gmail.com>
Stability | experimental
Portability | portable (template-haskell)
Safe Haskell | None
Language | Haskell2010

Language.Haskell.Meta.Parse

Description

Synopsis

- parsePat :: String -> Either String Pat
- parseExp :: String -> Either String Exp
- parseType :: String -> Either String Type
- parseDecs :: String -> Either String [Dec]
- parseDecsWithMode :: ParseMode -> String -> Either String [Dec]
- myDefaultParseMode :: ParseMode
- myDefaultExtensions :: [KnownExtension]
- parseResultToEither :: ParseResult a -> Either String a
- parseHsModule :: String -> Either String (Module SrcSpanInfo)
- parseHsDecls :: String -> Either String [Decl SrcSpanInfo]
- parseHsDeclsWithMode :: ParseMode -> String -> Either String [Decl SrcSpanInfo]
- parseHsType :: String -> Either String (Type SrcSpanInfo)
- parseHsExp :: String -> Either String (Exp SrcSpanInfo)
- parseHsPat :: String -> Either String (Pat SrcSpanInfo)
- pprHsModule :: Module SrcSpanInfo -> String
- moduleDecls :: Module SrcSpanInfo -> [Decl SrcSpanInfo]
- noSrcSpanInfo :: SrcSpanInfo
- emptyHsModule :: String -> Module SrcSpanInfo

# Documentation

parsePat :: String -> Either String Pat Source #

parseExp :: String -> Either String Exp Source #

parseType :: String -> Either String Type Source #

parseDecs :: String -> Either String [Dec] Source #

parseDecsWithMode :: ParseMode -> String -> Either String [Dec] Source #

Since: 0.8.2

myDefaultParseMode :: ParseMode Source #

Deprecated: The provided ParseModes aren't very meaningful, use your own instead

myDefaultExtensions :: [KnownExtension] Source #

Deprecated: The provided ParseModes aren't very meaningful, use your own instead

parseResultToEither :: ParseResult a -> Either String a Source #

parseHsModule :: String -> Either String (Module SrcSpanInfo) Source #

parseHsDecls :: String -> Either String [Decl SrcSpanInfo] Source #

parseHsDeclsWithMode :: ParseMode -> String -> Either String [Decl SrcSpanInfo] Source #

Since: 0.8.2

parseHsType :: String -> Either String (Type SrcSpanInfo) Source #

parseHsExp :: String -> Either String (Exp SrcSpanInfo) Source #

parseHsPat :: String -> Either String (Pat SrcSpanInfo) Source #

pprHsModule :: Module SrcSpanInfo -> String Source #

moduleDecls :: Module SrcSpanInfo -> [Decl SrcSpanInfo] Source #

noSrcSpanInfo :: SrcSpanInfo Source #

emptyHsModule :: String -> Module SrcSpanInfo Source #