6      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                                                                     Safe1345<Ve Safe1345<V1The parser type, parametrised by the stream type s and the return value aSafe1345<VGreturns (s, True) if the number is an integer, an (s, False) otherwise   None1345<VR~1The enclosing statement is an iteration statement-The enclosing statement is a switch statement 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!Statements, spec 12."{stmts} , spec 12.1#; , spec 12.3$expr; , spec 12.4% if (e) stmt , spec 12.5&if (e) stmt1 else stmt2 , spec 12.5'switch (e) clauses , spec 12.11(while (e) do stmt , spec 12.6)do stmt while (e); , spec 12.6* break lab; , spec 12.8+ continue lab; , spec 12.7, lab: stmt , spec 12.12-for (x in o) stmt , spec 12.6."ForStmt a init test increment body, !for (init; test, increment) body , spec 12.6/#try stmt catch(x) stmt finally stmt , spec 12.140 throw expr; , spec 12.131 return expr; , spec 12.92 with (o) stmt , spec 12.103 var x, y=42; , spec 12.24function f(x, y, z) {...} , spec 135for..in initializer, spec 12.66 var x7foo.baz, foo[bar], z8for initializer, spec 12.69empty:  var x, y=42; expr<!A variable declaration, spec 12.2=  var x = e;>Catch clause, spec 12.14? catch (x) {...}@Case clauses, spec 12.11A case e: stmts;B default: stmts;CExpressions, see spec 11D"foo", spec 11.1.3, 7.8E-RegexpLit a regexp global? case_insensitive?- -- regular expression, see spec 11.1.3, 7.8F41.99999, spec 11.1.3, 7.8G42, spec 11.1.3, 7.8Htrue, spec 11.1.3, 7.8Inull, spec 11.1.3, 7.8J[1,2,3] , spec 11.1.4K{foo:"bar", baz: 42} , spec 11.1.5Lthis , spec 11.1.1Mfoo , spec 11.1.2Nfoo.bar , spec 11.2.1Ofoo[bar , spec 11.2.1P new foo(bar) , spec 11.2.2Q@e', spec 11.4 (excluding 11.4.4, 111.4.5)R++x, x-- etc., spec 11.3, 11.4.4, 11.4.5Se1@e21, spec 11.5, 11.6, 11.7, 11.8, 11.9, 11.10, 11.11T e1 ? e2 : e3 , spec 11.12Ue1 @=e2 , spec 11.13Ve1, e2 , spec 11.14Wf(x,y,z),, spec 11.2.3 funcexprs are optionally namedXfunction f (x,y,z) {...}, spec 11.2.5, 13Y)Left-hand side expressions: see spec 11.2Zvariable reference, foo[ foo.bar\ foo[bar]]8Property names in an object initializer: see spec 11.1.5^ property name is an identifier, foo_property name is a string, "foo"`property name is an integer, 42a:Prefix operators: see spec 11.4 (excluding 11.4.4, 11.4.5)b !c ~d +e -f typeofg voidh deletei9Unary assignment operators: see spec 11.3, 11.4.4, 11.4.5j ++xk --xl x++m x--n$Assignment operators: see spec 11.13osimple assignment, =p +=q -=r *=s /=t %=u <<=v >>=w >>>=x &=y ^=z |={$Infix operators: see spec 11.5-11.11| <} <=~ > >= in  instanceof == != === !=== && || * / % - << >> >>> & ^ | +(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{|}~!"#$%&'()*+,-./01234@AB>?89:;567<=CDEFGHIJKLMNOPQRSTUVWX{|}~nopqrstuvwxyzabcdefgh]^_`ijklmYZ[\  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn opqrstuvwxyz{|}~None 1345;<=Vk 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 .$Print a list of items in parenthesis 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 automatically DEPRECATED: 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 RelationalExpressionNoIn           None1345<VlRNone1345<Vq|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 !"!"  None1345<V{ #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 tree'HChanges 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 field*Assigns 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 #%$&'()*+&'()*#$%+3210/.-,#$%None1345<V" pchecks if the label is not yet on the stack, if it is -- throws an error; otherwise it pushes it onto the stack:4The parser that parses a single ECMAScript statement?+A parser that parses ECMAScript expressionsA+A parser that parses an ECMAScript program.B,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.C$A convenience function that takes a 1 and tries to parse it as an ECMAScript program: "parseFromString = parse program ""DA 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.EJRead a JavaScript program from file an parse it into a list of statementsF(Parse a JavaScript program from a stringG:Parse a JavaScript source string into a list of statementsBThe parser to useName of the source filethe stream to parse, usually a CJavaScript source to parseD file nameE file nameFsource file nameJavaScript source to parseGJavaScript source456789:;<=>?@ABCDEFGB?:ACDFE@>G76<8954=;None1345<V: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  456789:;<=>?@ABCDEFG  None1345<VH+Labels are either strings (identifiers) or empty (see 12.12 of the spec)K8Annotates 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.Kannotation read functionannotation write functionthe script to annotateHIJKKHIJHIJ None1345<V)Convert an identifier to a String literal1Helper function to convert LValues to expressions;Convert an expression to an l-value. May fail with an errorlPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~pPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ None1345<Vx  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNNOOPPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,--./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTTUVWXYZ [ \ ] ^ _ ` a b c d e f g h i j k l # m n o p q r s t u v w x y z { | } ~                                                                               /language-ecmascript-0.19-9fSS9aDDWEcKX3WiQLVHquLanguage.ECMAScript3.SyntaxLanguage.ECMAScript3.ParserLanguage.ECMAScript3.Lexer Language.ECMAScript3.PrettyPrintLanguage.ECMAScript3.SourceDiff)Language.ECMAScript3.Analysis.Environment'Language.ECMAScript3.Syntax.Annotations'Language.ECMAScript3.Analysis.LabelSets#Language.ECMAScript3.Syntax.CodeGen&Language.ECMAScript3.Syntax.QuasiQuote!Language.ECMAScript3.Parser.State Language.ECMAScript3.Parser.Type Text.ParsecparseLanguage.ECMAScript3$parsec-3.1.11-Jx0X6lpzdHgC5NMoYR1Rc5Text.Parsec.Pos SourcePosParseridentifierStart identifierreservedoperator reservedOp charLiteral stringLiteralsymbol whiteSpaceparensbracessquaressemicommacolondotbracketslexeme decIntLit decDigitsOpt decDigits hexIntLit exponentPartdecLit HasLabelSet getLabelSet setLabelSetEnclosingStatement EnclosingIterEnclosingSwitchEnclosingOther Statement BlockStmt EmptyStmtExprStmtIfStmt IfSingleStmt SwitchStmt WhileStmt DoWhileStmt BreakStmt ContinueStmt LabelledStmt ForInStmtForStmtTryStmt ThrowStmt ReturnStmtWithStmt VarDeclStmt FunctionStmt ForInInitForInVar ForInLValForInitNoInitVarInitExprInitVarDecl CatchClause CaseClause CaseDefault Expression StringLit RegexpLitNumLitIntLitBoolLitNullLitArrayLit ObjectLitThisRefVarRefDotRef BracketRefNewExpr PrefixExprUnaryAssignExpr InfixExprCondExpr AssignExprListExprCallExprFuncExprLValueLVarLDotLBracketPropPropId PropStringPropNumPrefixOp PrefixLNot PrefixBNot PrefixPlus PrefixMinus PrefixTypeof PrefixVoid PrefixDelete UnaryAssignOp PrefixInc PrefixDec PostfixInc PostfixDecAssignOpOpAssign OpAssignAdd OpAssignSub OpAssignMul OpAssignDiv OpAssignModOpAssignLShiftOpAssignSpRShiftOpAssignZfRShift OpAssignBAnd OpAssignBXor OpAssignBOrInfixOpOpLTOpLEqOpGTOpGEqOpIn OpInstanceofOpEqOpNEq OpStrictEq OpStrictNEqOpLAndOpLOrOpMulOpDivOpModOpSubOpLShift OpSpRShift OpZfRShiftOpBAndOpBXorOpBOrOpAddId JavaScriptScript unJavaScriptunIdisIterationStmtisValid pushEnclosing pushLabelisValidIdentifierisValidIdentifierNameisReservedWordisValidIdStart isValidIdPartisIter isIterSwitch$fDefaultSourcePos$fDefaultJavaScript$fHasLabelSetEnclosingStatement$fShowEnclosingStatement$fShowId$fEqId$fOrdId$fDataId $fFunctorId $fFoldableId$fTraversableId $fShowInfixOp $fDataInfixOp $fEqInfixOp $fOrdInfixOp $fEnumInfixOp$fShowAssignOp$fDataAssignOp $fEqAssignOp $fOrdAssignOp$fShowUnaryAssignOp$fDataUnaryAssignOp$fEqUnaryAssignOp$fOrdUnaryAssignOp$fShowPrefixOp$fDataPrefixOp $fEqPrefixOp $fOrdPrefixOp $fShowProp $fDataProp$fEqProp $fOrdProp $fFunctorProp$fFoldableProp$fTraversableProp$fShowStatement$fDataStatement $fEqStatement$fOrdStatement$fFunctorStatement$fFoldableStatement$fTraversableStatement$fShowForInInit$fDataForInInit $fEqForInInit$fOrdForInInit$fFunctorForInInit$fFoldableForInInit$fTraversableForInInit $fShowLValue $fEqLValue $fOrdLValue $fDataLValue$fFunctorLValue$fFoldableLValue$fTraversableLValue$fShowExpression$fDataExpression$fEqExpression$fOrdExpression$fFunctorExpression$fFoldableExpression$fTraversableExpression $fShowForInit $fDataForInit $fEqForInit $fOrdForInit$fFunctorForInit$fFoldableForInit$fTraversableForInit $fShowVarDecl $fDataVarDecl $fEqVarDecl $fOrdVarDecl$fFunctorVarDecl$fFoldableVarDecl$fTraversableVarDecl$fShowCatchClause$fDataCatchClause$fEqCatchClause$fOrdCatchClause$fFunctorCatchClause$fFoldableCatchClause$fTraversableCatchClause$fShowCaseClause$fDataCaseClause$fEqCaseClause$fOrdCaseClause$fFunctorCaseClause$fFoldableCaseClause$fTraversableCaseClause$fShowJavaScript$fDataJavaScript$fEqJavaScript$fOrdJavaScript$fFunctorJavaScript$fFoldableJavaScript$fTraversableJavaScriptPPppPretty prettyPrintunsafeInExprStmt javaScriptrenderStatementsrenderExpression $fPrettyId $fPrettyProp$fPrettyPrefixOp$fPrettyAssignOp$fPrettyInfixOp$fPrettyCaseClause$fPrettyVarDecl$fPrettyLValue$fPrettyForInInit$fPrettyForInit$fPrettyCatchClause$fPrettyStatement$fPrettyExpression $fPretty[]$fPrettyJavaScript$fPPajsDiffEnvTreeenv localVars HasAnnotation getAnnotation setAnnotationremoveAnnotations reannotateaddExtraAnnotationFieldremoveExtraAnnotationFieldassignUniqueIdswithAnnotation$fHasAnnotationId$fHasAnnotationCatchClause$fHasAnnotationCaseClause$fHasAnnotationProp$fHasAnnotationVarDecl$fHasAnnotationLValue$fHasAnnotationStatement$fHasAnnotationExpressionExpressionParserStatementParserParsedExpressionParsedStatementparseBlockStmtparseStatement statementparseObjectLitparseSimpleExpr' assignExprparseExpression expression parseScriptprogramparseFromString parseFromFileparseJavaScriptFromFileparseScriptFromString parseStringLabel EmptyLabelannotateLabelSets $fOrdLabel $fEqLabel $fShowLabel $fDataLabelscriptidentpropIdpropSpropNlvarldotlbrackstringregexpnumberboolintnull_arrayobjectthisvarbracknewprefixlnotbnotplusminustypeofvoiddeleteuassignpreincpredecpostincpostdecinfixeltlegtgein_ instanceofeqneqsteqstneqlandlormuldivmodsublshiftsrshiftzrshiftbandborxoraddcondassignopassign assignadd assignsub assignmul assigndiv assignmod assignlshift assignsrshift assignzrshift assignband assignxor assignborlistcallfunclambdacaseedefaultccatchvardeclvarinitblockemptyexprifteiftswitchwhiledowhilebreakcontinuelabelforinfortrytrycatch tryfinallytrycatchfinallythrowreturnsretwithvardeclsfunction id2stringlv2ee2lv forInInit2lv$fIsStringExpression$fIsStringLValue$fIsStringProp $fIsStringIdjsexprjsstmtjs ParserStateghc-prim GHC.TypesTruebaseGHC.BaseStringGHC.Showshow-ansi-wl-pprint-0.6.8.2-LCZpQNUyexiFBaiHDiOJsa%Text.PrettyPrint.ANSI.Leijen.InternalDoc parenListprintIdentifierName regexpEscapeppRelationalExpressionPartial makeEnvTree partialLocalspartialReferences partialNestedannotateStatement