Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains a simple lambda calculus parser. This parser is not optimized for maximum
performance; instead it's written in a style which emulates the look and feel of conventional
monadic parsers. An optimized implementation would use low-level switch
expressions more often.
Documentation
type Name = ByteString Source #
A term in the language. The precedences of different constructs are the following, in decreasing order of strength:
- Identifiers, literals and parenthesized expressions
- Function application (left assoc)
- Multiplication (left assoc)
- Addition (left assoc)
- Equality, less-than (non-assoc)
lam
,let
,if
(right assoc)
Parse an identifier. This parser uses isKeyword
to check that an identifier is not a
keyword.