Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Parsers for PIR terms in DefaultUni.
Synopsis
- parse ∷ (AsParserErrorBundle e, MonadError e m, MonadQuote m) ⇒ Parser a → String → Text → m a
- program ∷ Parser (Program TyName Name DefaultUni DefaultFun SrcSpan)
- pType ∷ Parser PType
- pTerm ∷ Parser PTerm
- parseProgram ∷ (AsParserErrorBundle e, MonadError e m, MonadQuote m) ⇒ Text → m (Program TyName Name DefaultUni DefaultFun SrcSpan)
- type Parser = ParsecT ParserError Text (StateT ParserState (ReaderT (Maybe Version) Quote))
- data SourcePos
Documentation
parse ∷ (AsParserErrorBundle e, MonadError e m, MonadQuote m) ⇒ Parser a → String → Text → m a Source #
parseProgram ∷ (AsParserErrorBundle e, MonadError e m, MonadQuote m) ⇒ Text → m (Program TyName Name DefaultUni DefaultFun SrcSpan) Source #
type Parser = ParsecT ParserError Text (StateT ParserState (ReaderT (Maybe Version) Quote)) Source #
The data type SourcePos
represents source positions. It contains the
name of the source file, a line number, and a column number. Source line
and column positions change intensively during parsing, so we need to
make them strict to avoid memory leaks.