[P>      !"#$%&'()*+,-./0123456789:;<=None;<Token type, used to communicate between the lexer and parser +The cursor's location while lexing the textFConvert a text representation of an expression into a stream of tokensT keeps track of position and returns the remainder of the input if lexing fails.E>?@ABCDEFGHIJKL MNOPQ RSTUVWXYZ[\]^_`abcdefghijklmnop   '>A@?BEDCFJIHGKL MNOPQ RSTUVWXYZ[\]^_`abcdefghijklmnop Safe-Inferred+-A structured type error that includes contextThe specific type error$Bound variable names and their types0Variable names may appear more than once in the . The ( x@n refers to the nth occurrence of x in the  (using 0-based numbering).Syntax tree for expressions App f a ~ f a! =Pi x A B ~ "(x : A) ! B Pi unused A B ~ A ! B" Lam x A b ~ (x : A) ! b# )Var (V x 0) ~ x Var (V x n) ~ x@n$ Const c ~ c%+Constants for the calculus of constructionsThe only axiom is: " * : %&... and all four rule pairs are valid: /" * ! * : * " % ! * : * " * ! % : % " % ! % : %(Label for a bound variableThe q% field is the variable's name (i.e. "x").The r! field disambiguates variables with the same name if there are multiple bound variables of the same name in scope. Zero refers to the nearest bound variable and the index increases by one for each bound variable of the same name going outward. The following diagram may help: @ +-refers to-+ | | v | \(x : *) -> \(y : *) -> \(x : *) -> x@0 +-------------refers to-------------+ | | v | \(x : *) -> \(y : *) -> \(x : *) -> x@1This r_ behaves like a De Bruijn index in the special case where all variables have the same name.+You can optionally omit the index if it is 0:  +refers to+ | | v | \(x : *) -> \(y : *) -> \(x : *) -> x.Zero indices are omitted when pretty-printing (6s and non-zero indices appear as a numeric suffix.*Render a pretty-printed % as a s+Render a pretty-printed ( as a s,Render a pretty-printed  as a s-Determine whether a !#-bound variable should be displayed1Notice that if any variable within the body of a !P shares the same name and an equal or greater DeBruijn index we display the !]-bound variable. To illustrate why we don't just check for equality, consider this type: 'forall (a : *) -> forall (a : *) -> a@1The a@1 refers to the outer a2 (i.e. the left one), but if we hid the inner a/ (the right one), the type would make no sense: forall (a : *) -> * -> a@1... because the a@15 would misleadingly appear to be an unbound variable..Render a pretty-printed  as a s/Render a pretty-printed  as a st;Substitute all occurrences of a variable with an expression subst x n C B ~ B[x@n := C]u shift n x 0 adds n* to the index of all free variables named x within an 0yType-check an expression and return the expression's type if type-checking suceeds or an error if type-checking fails0 does not necessarily normalize the type since full normalization is not necessary for just type-checking. If you actually care about the returned type then you may want to 2 it afterwards.11 is the same as 0 with an empty context, meaning that the expression must be closed (i.e. no free variables), otherwise type-checking will fail.v-Reduce an expression to weak-head normal formw3Returns whether a variable is free in an expression2]Reduce an expression to its normal form, performing both beta reduction and eta reduction2 does not type-check the expression. You may want to type-check expressions before normalizing them since normalization can convert an ill-typed expression into a well-typed expression.3Pretty-print an expression1The result is a syntactically valid Morte program4Pretty-print a type error: !"#$%&'()xyz{|}*+,-./tu01vw234~# !"#$%&'()*+,-./01234#()%'&$#"! 012-34*+,./($#"! %'&()xyz{|}*+,-./tu01vw234~None" *+-./02345689:;<=?BCDFGHJKM5"Structured type for parsing errors9The specific parsing error:+Parsing failed, returning the invalid token;2Lexing failed, returning the remainder of the text< Parse an  from q or return a 5 if parsing fails=Pretty-print a 5a56789:;<= 56789:;<= <=56789;:X56789;:<=   Safe-Inferred      !"#$ %&''  &()*+,-./01234456789:;<=<>?@?ABCDEFGHIIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqlrstuvwxyz{|}~ morte-1.1.1 Morte.Lexer Morte.Core Morte.ParserMorte.TutorialTokenEOFNumberLabelPiLambdaArrowBoxStarAtColon CloseParen OpenParenPositionPlineNocolumnNolexExpr TypeErrorcontextcurrent typeMessage TypeMessageUntyped TypeMismatch NotAFunctionInvalidOutputTypeInvalidInputTypeUnboundVariableContextExprAppLamVarConstV buildConstbuildVar buildExprusedbuildTypeMessagebuildTypeErrortypeWithtypeOf normalize prettyExprprettyTypeError ParseErrorposition parseMessage ParseMessageParsingLexing exprFromTextprettyParseErrorAlexAcc AlexAccSkip AlexAccNone AlexLastAcc AlexLastSkipAlexNone AlexReturn AlexTokenAlexSkip AlexErrorAlexEOFAlexAddrAlexA# AlexInputprevChar currBytes currInput alex_base alex_table alex_check alex_deflt alex_accepttoIntencodelinecolumn alexGetBytealexInputPrevChar alex_action_1 alex_action_3 alex_action_4 alex_action_5 alex_action_6 alex_action_7 alex_action_8 alex_action_9alex_action_10alex_action_11alex_action_12alex_action_13alexIndexInt16OffAddralexIndexInt32OffAddr quickIndexalexScan alexScanUser alex_scan_tkniUnbox$fFunctorAlexLastAcc text-1.2.0.4Data.Text.Internal.LazyTextghc-prim GHC.TypesIntData.Text.Internal.BuilderBuildersubstshiftwhnffreeInputUtf8getUtf8axiomrulelookupN lookupCtx$fNFDataTypeError$fExceptionTypeError$fShowTypeError$fNFDataTypeMessage $fNFDataExpr$fIsStringExpr $fBinaryExpr$fEqExpr $fNFDataConst $fBinaryConst $fNFDataVar $fIsStringVar $fBinaryVar HappyAddrHappyA#HappyStk Happy_IntList HappyConsLexStatusHappyAny HappyAbsSynhappyIn4 happyOut4happyIn5 happyOut5happyIn6 happyOut6happyIn7 happyOut7 happyInTok happyOutTokhappyActOffsetshappyGotoOffsetshappyDefActions happyCheck happyTablehappyReduceArr happy_n_termshappy_n_nonterms happyReduce_1happyReduction_1 happyReduce_2happyReduction_2 happyReduce_3happyReduction_3 happyReduce_4happyReduction_4 happyReduce_5happyReduction_5 happyReduce_6happyReduction_6 happyReduce_7happyReduction_7 happyReduce_8happyReduction_8 happyReduce_9happyReduction_9happyReduce_10happyReduction_10happyReduce_11happyReduction_11happyReduce_12happyReduction_12 happyNewToken happyError_ happyThen happyReturn happyThen1 happyReturn1 happyError' parseExprhappySeq generalizelexer parseError happyParse happyAccept happyDoActionindexShortOffAddr happyShifthappySpecReduce_0happySpecReduce_1happySpecReduce_2happySpecReduce_3 happyReducehappyMonadReducehappyMonad2Reduce happyDrop happyDropStk happyGoto happyFail notHappyAtAll happyTcHack happyDoSeq happyDontSeq$fExceptionParseError$fShowParseError$fErrorParseMessage