!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{| } ~         Safe-Inferred+-./3M  Safe-Inferred+-./3M1The parser type, parametrised by the stream type s and the return value a Safe-Inferred+-./3MGreturns (s, True) if the number is an integer, an (s, False) otherwise     None+-./3M~9The enclosing statement is some other statement. Note, ! is never pushed if the current labelSetQ is empty, so the list of labels in this constructor should always be non-empty-The enclosing statement is a switch statement 1The enclosing statement is an iteration statement!Statements, spec 12."function f(x, y, z) {...} , spec 13# var x, y=42; , spec 12.2$ with (o) stmt , spec 12.10% return expr; , spec 12.9& throw expr; , spec 12.13'#try stmt catch(x) stmt finally stmt , spec 12.14("ForStmt a init test increment body, !for (init; test, increment) body , spec 12.6)for (x in o) stmt , spec 12.6* lab: stmt , spec 12.12+ continue lab; , spec 12.7, break lab; , spec 12.8-do stmt while (e); , spec 12.6.while (e) do stmt , spec 12.6/switch (e) clauses , spec 12.110if (e) stmt1 else stmt2 , spec 12.51 if (e) stmt , spec 12.52expr; , spec 12.43; , spec 12.34{stmts} , spec 12.15for..in initializer, spec 12.66foo.baz, foo[bar], z7 var x8for initializer, spec 12.69 expr:  var x, y=42;empty<!A variable declaration, spec 12.2=  var x = e;>Catch clause, spec 12.14? catch (x) {...}@Case clauses, spec 12.11A default: stmts;B case e: stmts;CExpressions, see spec 11Dfunction f (x,y,z) {...}, spec 11.2.5, 13Ef(x,y,z),, spec 11.2.3 funcexprs are optionally namedFe1, e2 , spec 11.14Ge1 @=e2 , spec 11.13H e1 ? e2 : e3 , spec 11.12Ie1@e21, spec 11.5, 11.6, 11.7, 11.8, 11.9, 11.10, 11.11J++x, x-- etc., spec 11.3, 11.4.4, 11.4.5K@e', spec 11.4 (excluding 11.4.4, 111.4.5)L new foo(bar) , spec 11.2.2Mfoo[bar , spec 11.2.1Nfoo.bar , spec 11.2.1Ofoo , spec 11.1.2Pthis , spec 11.1.1Q{foo:"bar", baz: 42} , spec 11.1.5R[1,2,3] , spec 11.1.4Snull, spec 11.1.3, 7.8Ttrue, spec 11.1.3, 7.8U42, spec 11.1.3, 7.8V41.99999, spec 11.1.3, 7.8W-RegexpLit a regexp global? case_insensitive?- -- regular expression, see spec 11.1.3, 7.8X"foo", spec 11.1.3, 7.8Y)Left-hand side expressions: see spec 11.2Z foo[bar][ foo.bar\variable reference, foo]8Property names in an object initializer: see spec 11.1.5^property name is an integer, 42_property name is a string, "foo"` property name is an identifier, fooa:Prefix operators: see spec 11.4 (excluding 11.4.4, 11.4.5)b deletec voidd typeofe -f +g ~h !i9Unary assignment operators: see spec 11.3, 11.4.4, 11.4.5j x--k x++l --xm ++xn$Assignment operators: see spec 11.13o |=p ^=q &=r >>>=s >>=t <<=u %=v /=w *=x -=y +=zsimple assignment, ={$Infix operators: see spec 11.5-11.11| +} |~ ^ & >>> >> << - % / * || && !=== === != ==  instanceof in >= > <= <(A script in <script> ... </script> tags.*extracts statements from a JavaScript typeReturns  if the statement is an IterationStatement according to spec 12.6.The ECMAScript standard defines certain syntactic restrictions on programs (or, more precisely, statements) that aren't easily enforced in the AST datatype. These restrictions have to do with labeled statements and break/continue statement, as well as identifier names. Thus, it is possible to manually generate AST's that correspond to syntactically incorrect programs. Use this predicate to check if an @ AST corresponds to a syntactically correct ECMAScript program.;Checks if an identifier name is valid according to the specChecks if the # represents a valid identifier name>Checks if a string is in the list of reserved ECMAScript words<Checks if a character is valid at the start of an identifier4Checks if a character is valid in an identifier part !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!43210/.-,+*)('&%$#"@BA>?8;:9576<=CXWVUTSRQPONMLKJIHGFED{~}|nzyxwvutsrqpoahgfedcb]`_^imlkjY\[Z * !43210/.-,+*)('&%$#"5768;:9<=>?@BACXWVUTSRQPONMLKJIHGFEDY\[Z]`_^ahgfedcbimlkjn zyxwvutsrqpo{~}|None +-./234M gA class of pretty-printable ECMAScript AST nodes. Will pretty-print correct JavaScript given that the  predicate holds for the AST.)Pretty-print an ECMAScript AST node. Use render or  to convert  to .A predicate to tell if the expression --when pretty-printed-- will begin with "function" or '{' and be thus unsafe to use in an expression statement without wrapping it in '()'.DEPRECATED: Use L instead! Renders a JavaScript program as a document, the show instance of $ will pretty-print it automaticallyDEPRECATED: Use - instead! Renders a list of statements as a DEPRECATED: Use - instead! Renders a list of statements as a Pretty prints a string assuming it's used as an identifier. Note that per Spec 7.6 unicode escape sequences representing illegal identifier characters are not allowed as well, so we do not unicode-escape illegal characters in identifiers anymore.JEscapes a regular expression so that it can be parsed correctly afterwardsppRelationalExpression True is RelationalExpression, ppRelationalExpression False is RelationalExpressionNoIn64None+-./3M DThings that have annotations -- for example, nodes in a syntax tree.Returns the annotation of the root of the tree-Sets the annotation of the root of the tree Removes annotations from a treeHChanges all the labels in the tree to another one, given by a function.@add an extra field to the AST labels (the label would look like  (a, b) )remove an extra fieldAssigns unique numeric (Int) ids to each node in the AST. Returns a pair: the tree annotated with UID's and the last ID that was assigned.9Modify the annotation of the root node of the syntax tree starting id tree root None+-./3M pchecks if the label is not yet on the stack, if it is -- throws an error; otherwise it pushes it onto the stack4The parser that parses a single ECMAScript statement+A parser that parses ECMAScript expressions+A parser that parses an ECMAScript program.,Parse from a stream given a parser, same as ` in Parsec. We can use this to parse expressions or statements alone, not just whole programs.$A convenience function that takes a 1 and tries to parse it as an ECMAScript program: "parseFromString = parse program ""A convenience function that takes a filename and tries to parse the file contents an ECMAScript program, it fails with an error message if it can't.JRead a JavaScript program from file an parse it into a list of statements(Parse a JavaScript program from a string:Parse a JavaScript source string into a list of statementsTThe parser to useName of the source filethe stream to parse, usually a JavaScript source to parse file name file namesource file nameJavaScript source to parseJavaScript sourceTNone+-./3M8A class of AST elements that need fixup after generationnRenames empty identifiers, as well as identifiers that are keywords or future reserved words by prepending a '_'B to them. Also substitutes illegal characters with a "_" as well.Fixes an incorrect nesting of break/continue, making the program abide by the ECMAScript spec (page 92): any continue without a label should be nested within an iteration stmt, any continue with a label should be nested in a labeled statement (not necessarily with the same label); any break statement without a label should be nested in an iteration or switch stmt, any break statement with a label should be nested in a labeled statement (not necessarily with the same label). This is done by either assigning a label (from the set of labels in current scope) to a break/continue statement that doesn't have one (or has a label that's not present in the current scope). Additionally, it removes nested labelled statements with duplicate labels (also a requirement imposed by the spec).&choose n elements from a list randomly$Selects a random element of the list887None+-./3Mq)Convert an identifier to a String literalr1Helper function to convert LValues to expressionss;Convert an expression to an l-value. May fail with an errorp      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxl      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstp xw    vu !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstp      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxNone+-./3Myz{  yz{{yzyz{  None+-./3M|EThe statically-determinate lexical structure of a JavaScript program. cIntermediate data structure that contains locally declared names and all references to identifers.|}   enclosing environment local environment and references"environment and global definitions~browser/testing environment|}~~|}|}   ~ None+-./3M+Labels are either strings (identifiers) or empty (see 12.12 of the spec)8Annotates statements with their label sets; example use:+let jsa = reannotate (\a -> (a, Set.empty))Iin annotateLabelSets jsa snd (\labs (a, ls) -> (a, labs `Set.union` ls)) 12 ECMA262: the production  Identifier :  Statement is evaluated by adding  Identifier to the label ser of  Statement and then evluating  Statement . If the LabelledStatementT itsef has a non-empty label set, these labels are also added to the label set of  Statement5 before evaluating it. ... Prior to evaluation of a LabelledStatement, the contained  Statement@ is regarded as possessing an empty label set, unless it is an IterationStatement or a SwitchStatement\, in which case it is regarded as possessing a label set consisting of the single element, empty.annotation read functionannotation write functionthe script to annotate !" !" None+-./3MNone+-./3M !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~#  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOOPPQRQSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'($)*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                     h    ! "  i # $ % & ' ( ) * + , -.language-ecmascript-0.17.0.1Language.ECMAScript3.SyntaxLanguage.ECMAScript3.ParserLanguage.ECMAScript3.Lexer Language.ECMAScript3.PrettyPrint'Language.ECMAScript3.Syntax.Annotations%Language.ECMAScript3.Syntax.Arbitrary#Language.ECMAScript3.Syntax.CodeGen&Language.ECMAScript3.Syntax.QuasiQuote)Language.ECMAScript3.Analysis.Environment'Language.ECMAScript3.Analysis.LabelSetsLanguage.ECMAScript3.SourceDiff!Language.ECMAScript3.Parser.State Language.ECMAScript3.Parser.Type Text.ParsecparseLanguage.ECMAScript3 parsec-3.1.9Text.Parsec.Pos SourcePosParseridentifierStart identifierreservedoperator reservedOp charLiteral stringLiteralsymbol whiteSpaceparensbracessquaressemicommacolondotbracketslexeme decIntLit decDigitsOpt decDigits hexIntLit exponentPartdecLit HasLabelSet getLabelSet setLabelSetEnclosingStatementEnclosingOtherEnclosingSwitch EnclosingIter Statement FunctionStmt VarDeclStmtWithStmt ReturnStmt ThrowStmtTryStmtForStmt ForInStmt LabelledStmt ContinueStmt BreakStmt DoWhileStmt WhileStmt SwitchStmt IfSingleStmtIfStmtExprStmt EmptyStmt BlockStmt ForInInit ForInLValForInVarForInitExprInitVarInitNoInitVarDecl CatchClause CaseClause CaseDefault ExpressionFuncExprCallExprListExpr AssignExprCondExpr InfixExprUnaryAssignExpr PrefixExprNewExpr BracketRefDotRefVarRefThisRef ObjectLitArrayLitNullLitBoolLitIntLitNumLit RegexpLit StringLitLValueLBracketLDotLVarPropPropNum PropStringPropIdPrefixOp PrefixDelete PrefixVoid PrefixTypeof PrefixMinus PrefixPlus PrefixBNot PrefixLNot UnaryAssignOp PostfixDec PostfixInc PrefixDec PrefixIncAssignOp OpAssignBOr OpAssignBXor OpAssignBAndOpAssignZfRShiftOpAssignSpRShiftOpAssignLShift OpAssignMod OpAssignDiv OpAssignMul OpAssignSub OpAssignAddOpAssignInfixOpOpAddOpBOrOpBXorOpBAnd OpZfRShift OpSpRShiftOpLShiftOpSubOpModOpDivOpMulOpLOrOpLAnd OpStrictNEq OpStrictEqOpNEqOpEq OpInstanceofOpInOpGEqOpGTOpLEqOpLTId JavaScriptScript unJavaScriptunIdisIterationStmtisValid pushEnclosing pushLabelisValidIdentifierisValidIdentifierNameisReservedWordisValidIdStart isValidIdPartisIter isIterSwitchPPppPretty prettyPrintunsafeInExprStmt javaScriptrenderStatementsrenderExpression HasAnnotation getAnnotation setAnnotationremoveAnnotations reannotateaddExtraAnnotationFieldremoveExtraAnnotationFieldassignUniqueIdswithAnnotation$fHasAnnotationId$fHasAnnotationCatchClause$fHasAnnotationCaseClause$fHasAnnotationProp$fHasAnnotationVarDecl$fHasAnnotationLValue$fHasAnnotationStatement$fHasAnnotationExpressionExpressionParserStatementParserParsedExpressionParsedStatementparseBlockStmtparseStatement statementparseObjectLitparseSimpleExpr' assignExprparseExpression expression parseScriptprogramparseFromString parseFromFileparseJavaScriptFromFileparseScriptFromString parseString$fEnumerableAssignOp$fEnumerableInfixOp$fEnumerableUnaryAssignOp$fEnumerablePrefixOp$fEnumerableId$fEnumerableCaseClause$fEnumerableCatchClause$fEnumerableProp$fEnumerableLValue$fEnumerableForInit$fEnumerableForInInit$fEnumerableVarDecl$fEnumerableExpression$fEnumerableStatementFixablefixUp LabelSubstcshrinkemptyStmtShrinkemptyConstantPool fixLValue fixUpFunExpr fixUpFunStmtidentifierFixupidentifierNameFixupfixBreakContinue rChooseElemselectRandomElement isSwitchStmt$fFixableLValue $fFixableProp $fFixableId$fFixableVarDecl$fFixableForInInit$fFixableForInit$fFixableCatchClause$fFixableCaseClause$fFixableStatement$fFixableExpression$fFixableJavaScript$fArbitraryJavaScript$fArbitraryStatement$fArbitraryVarDecl$fArbitraryCatchClause$fArbitraryForInit$fArbitraryForInInit$fArbitraryExpression$fArbitraryLValue$fArbitraryProp$fArbitraryCaseClause $fArbitraryId$fArbitraryPrefixOp$fArbitraryUnaryAssignOp$fArbitraryInfixOp$fArbitraryAssignOp$fEnumerableJavaScriptscriptidentpropIdpropSpropNlvarldotlbrackstringregexpnumberboolintnull_arrayobjectthisvarbracknewprefixlnotbnotplusminustypeofvoiddeleteuassignpreincpredecpostincpostdecinfixeltlegtgein_ instanceofeqneqsteqstneqlandlormuldivmodsublshiftsrshiftzrshiftbandborxoraddcondassignopassign assignadd assignsub assignmul assigndiv assignmod assignlshift assignsrshift assignzrshift assignband assignxor assignborlistcallfunclambdacaseedefaultccatchvardeclvarinitblockemptyexprifteiftswitchwhiledowhilebreakcontinuelabelforinfortrytrycatch tryfinallytrycatchfinallythrowreturnsretwithvardeclsfunction id2stringlv2ee2lv forInInit2lv$fIsStringExpression$fIsStringLValue$fIsStringProp $fIsStringIdjsexprjsstmtjsEnvTreeenv localVarsLabel EmptyLabelannotateLabelSetsjsDiff ParserState javascriptDeflexmarrghc-prim GHC.TypesTruebaseGHC.BaseString checkStmt checkStmtM iterCommon checkCaseM checkCatchM bracketStatemodifyLabelSet$fHasLabelSetEnclosingStatement$fShowEnclosingStatement$fDefaultSourcePos$fDefaultJavaScriptGHC.Showshow wl-pprint-1.2Text.PrettyPrint.LeijenDocprintIdentifierName regexpEscapeppRelationalExpressioninBlockasBlock indentBlock ppVarDecljsEscapeppPrimaryExpressionppMemberExpressionppCallExpression ppObjInDotRef ppArgumentsppLHSExpressionppPostfixExpressionppUnaryExpression prefixSpaceppMultiplicativeExpressionppAdditiveExpressionppShiftExpressionppEqualityExpressionppBitwiseANDExpressionppBitwiseXORExpressionppBitwiseORExpressionppLogicalANDExpressionppLogicalORExpressionppConditionalExpressionppAssignmentExpression ppExpressionmaybe$fPPa $fPrettyId $fPrettyProp$fPrettyPrefixOp$fPrettyAssignOp$fPrettyInfixOp$fPrettyCaseClause$fPrettyVarDecl$fPrettyLValue$fPrettyForInInit$fPrettyForInit$fPrettyCatchClause$fPrettyStatement$fPrettyExpression $fPretty[]$fPrettyJavaScriptinitialParserStatepopLabel clearLabelswithFreshLabelStack parseIfStmtparseSwitchStmtparseWhileStmtparseDoWhileStmtparseContinueStmtparseBreakStmtparseEmptyStmtparseLabelledStmtparseExpressionStmtparseForInStmt parseForStmt parseTryStmtparseThrowStmtparseReturnStmt parseWithStmt parseVarDeclparseVarDeclStmtparseFunctionStmt parseThisRef parseNullLit parseBoolLit parseVarRef parseArrayLit parseFuncExpr escapeChars allEscapesparseEscapeCharparseAsciiHexCharparseUnicodeHexChar isWhitespaceparseStringLit'parseStringLitparseRegexpLithexdecimal wrapReadS parseNumber parseNumLitwithPosdotReffuncApp bracketRefparseParenExprparseExprForNew parseNewExprparseSimpleExprparseSimpleExprForNew makeInfixExprparsePrefixedExpr exprTableparseExpression'asLValuelvalueunaryAssignExprparseTernaryExpr'parseTernaryExprassignOp parseListExpr quoteJSExpr quoteJSStmtquoteJS quoteCommonPartial partialLocalspartialReferences partialNestedrefdeclnestunions javascript caseClause catchClausevarDeclforInit forInInitstmt makeEnvTreeannotateStatementannotateFuncStmtBodiesannotateFuncExprBodiesid2Label