Module Smyth.Parse

type problem =
| ExpectingLeftParen
| ExpectingRightParen
| ExpectingLeftBracket
| ExpectingRightBracket
| ExpectingComma
| ExpectingRightArrow
| ExpectingLAngle
| ExpectingRAngle
| ExpectingSpace
| ExpectingPound
| ExpectingDot
| ExpectingEquals
| ExpectingDoubleEquals
| ExpectingHole
| ExpectingLambda
| ExpectingPipe
| ExpectingColon
| ExpectingFuncSpec
| ExpectingWildcard
| ExpectingLineComment
| ExpectingMultiCommentStart
| ExpectingMultiCommentEnd
| ExpectingExactly of int * int
| ExpectingMoreIndent
| ExpectingLet
| ExpectingIn
| ExpectingCase
| ExpectingOf
| ExpectingType
| ExpectingAssert
| ExpectingNat
| ExpectingConstructorName
| ExpectingVariableName
| ExpectingHoleName
| ExpectingFunctionArity
| ExpectingTupleSize
| ExpectingTupleIndex
| ExpectingName of string * string
| NegativeArity of int
| ZeroArity
| ExpectingEnd

The possible parse errors.

type context =
| CType
| CTTuple
| CTData
| CTArr
| CTForall
| CTVar
| CTypeParam
| CTypeArg
| CPat
| CPTuple
| CPVar
| CPWildcard
| CExp
| CELet
| CEVar
| CECtor
| CETuple
| CEProj
| CEApp
| CEHole
| CELambda
| CECase
| CEList
| CENat
| CStatement
| CSDatatype
| CSDatatypeCtors
| CSDefinition
| CSAssertion
| CSFuncSpec
| CSFuncSpecInput
| CSFuncSpecOutput
| CProgram

The possible parse contexts.

type 'a parser = (contextproblem'a) Bark.parser

The type of a parser.

val exp : Lang.exp parser

Expression parser.

val typ : Lang.typ parser

Type parser.

val program : Desugar.program parser

Program parser.

Warning: parses expressions but does NOT call Post_parse.exp (happens in Desugar.program).