glambda-1.0.1: A simply typed lambda calculus interpreter, written with GADTs

Copyright(C) 2015 Richard Eisenberg
LicenseBSD-style (see LICENSE)
MaintainerRichard Eisenberg (eir@cis.upenn.edu)
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Language.Glambda.Parse

Description

Parses tokens into the un-type-checked AST. Parsing, in glambda, also includes name resolution. This all might conceivably be done in a later pass, but there doesn't seem to be an incentive to do so.

Synopsis

Documentation

parseStmtsG :: [LToken] -> GlamE [Statement] Source

Parse a sequence of semicolon-separated statements, aborting with an error upon failure

parseStmts :: [LToken] -> Either String [Statement] Source

Parse a sequence of semicolon-separated statements

parseStmtG :: [LToken] -> GlamE Statement Source

Parse a Statement, aborting with an error upon failure

parseExpG :: [LToken] -> GlamE UExp Source

Parse a UExp, aborting with an error upon failure