Language.Haskell.Meta.Parse

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 #

parseExp :: String -> Either String Exp #

parseType :: String -> Either String Type #

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

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

Since: 0.8.2

myDefaultParseMode :: ParseMode #

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

myDefaultExtensions :: [KnownExtension] #

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

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] #

Since: 0.8.2

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 #