+==      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdef g h i j k l m n o p q r s t u v w x y z { | } ~       NoneDifference list  Empty list Singleton list  Given a list is9 of unique natural numbers, returns a function that maps  each number in is! to a unique number in the range [0 .. length is-1]. The  complexity is O( maximum is). KCount the number of occurrences of each element in the list. The result is = an array mapping each element to its number of occurrences. KPartitions the list such that two elements are in the same sub-list if and G only if they satisfy the equivalence check. The complexity is O(n^2). 4Upper and lower bound on the elements to be counted Elements to be counted None Symbol subsumption Injection from sub to sup Symbol projection Partial projection from sup to sub !Direct sum of two symbol domains 5The result type of a symbol with the given signature -Class for the type-level recursion needed by  7Signature of a partially applied (or unapplied) symbol $Signature of a fully applied symbol #Fully applied abstract syntax tree ?Generic abstract syntax tree, parameterized by a symbol domain ( dom (a  b))/ represents a partially applied (or unapplied) . symbol, missing at least one argument, while ( dom ( a)) A represents a fully applied symbol, i.e. a complete syntax tree. -Count the number of symbols in an expression Generic symbol application  has any type of the form:  appSym :: (expr :<: AST dom) * => expr (a :-> b :-> ... :-> Full x) 8 -> (ASTF dom a -> ASTF dom b -> ... -> ASTF dom x)       None=Can be used to make an arbitrary type constructor indexed by ( a). 5 This is useful as the type constructor parameter of . That is, use   Args (WrapFull c) ...  instead of   Args c ... if c is not indexed by ( a). List of symbol arguments "IMap a function over all immediate sub-terms (corresponds to the function / with the same name in Scrap Your Boilerplate) #IMap a function over all immediate sub-terms, collecting the results in a D list (corresponds to the function with the same name in Scrap Your  Boilerplate) $DApply a transformation bottom-up over an expression (corresponds to   everywhere in Scrap Your Boilerplate) %CApply a transformation top-down over an expression (corresponds to   everywhere' in Scrap Your Boilerplate) &Map a function over an - list and collect the results in an ordinary  list 'Map a function over an  list ($Map an applicative function over an  list )Map a monadic function over an  list *?Apply a (partially applied) symbol to a list of argument terms +" Pattern match" on an - using a function that gets direct access to ' the top-most symbol and its sub-trees - A version of + with a simpler result type .Fold an  using an ' list to hold the results of sub-terms /Simplified version of ./ for situations where all intermediate results  have the same type 0Fold an / using a list to hold the results of sub-terms 1 A version of +0 where the result is a transformed syntax tree,  wrapped in a type constructor c  !"#$%&'()*+,-./01 !"#$%&'()*+,-./01#"$%! &'()*0+,-./1! "#$%&'()*+,-./01None2Equality for expressions 3Equality for expressions FComparing expressions of different types is often needed when dealing ; with expressions with existentially quantified sub-terms. 4 Computes a / for an expression. Expressions that are equal  according to 3 must result in the same hash: (equal a b ==> exprHash a == exprHash b234234234234None6HConvert a partially applied expression to a syntax tree given a list of  rendered missing arguments 7IRender an expression as concrete syntax. A complete instance must define  either of the methods 8 and 9. 8Render an expression as a   9GRender a partially applied expression given a list of rendered missing  arguments :Print an expression !'Convert an expression to a syntax tree ;!Show syntax tree using ASCII art <"Print syntax tree using ASCII art 56789:!;<"#$%&'56789:;<789:56;< 56789:!;<"#$%&'None>Evaluation of expressions ?4The denotation of a symbol with the given signature =>?()=>??=>=>?()None@3 with bounded existentially quantified result type B+ with existentially quantified result type DSymbol injection (like  ) with constrained result types G.Expressions that constrain their result types H@Returns a predicate that is satisfied by the result type of all $ expressions of the given type (see I). I9Compute a constraint on the result type of an expression JCConstrain the result type of the expression by the given predicate The difference between J and L! is seen in the instances of the H  type: - type Sat (dom :| pred) = pred :/\: Sat dom  type Sat (dom :|| pred) = pred LCConstrain the result type of the expression by the given predicate N#Subset relation on type predicates OCompute evidence that sub is a subset of sup (i.e. that (sup a)  implies (sub a)) PEvidence that the predicate sub is a subset of sup QUniversal type predicate R Intersection of type predicates SWeaken an intersection TWeaken an intersection U A version of I, that returns a constraint for a particular  predicate p as long as (p :< Sat dom) holds V A version of I$ that works for domains of the form  (dom1 :+: dom2) as long as (Sat dom1 ~ Sat dom2) holds WGeneric symbol application W has any type of the form: % appSymC :: InjectC expr (AST dom) x * => expr (a :-> b :-> ... :-> Full x) 8 -> (ASTF dom a -> ASTF dom b -> ... -> ASTF dom x) 5@ABCDEFGHIJKLMNOPQRSTUVWXYZ[*+,-./0123456789:;<=>?@AB@ABCDEFGHIJKLMNOPQRSTUVWXYZ[RQPSTNOLMJKGHIFUVDEWBCXY@AZ[-@ABCDEFGHIJKLMNOPQRSTUVWXYZ[*+,-./0123456789:;<=>?@ABNone\N-ary syntactic functions ] has any type of the form:   desugarN ::  ( Syntactic a dom  , Syntactic b dom  , ...  , Syntactic x dom  ) => (a -> b -> ... -> x) # -> ( ASTF dom (Internal a) # -> ASTF dom (Internal b)  -> ... # -> ASTF dom (Internal x)  ) ...and vice versa for ^. _It is usually assumed that (a (b a)) has the same meaning  as a. cSyntactic type casting d"Sugared" symbol application d has any type of the form:  sugarSym ::  ( expr :<: AST dom  , Syntactic a dom  , Syntactic b dom  , ...  , Syntactic x dom I ) => expr (Internal a :-> Internal b :-> ... :-> Full (Internal x))  -> (a -> b -> ... -> x) e"Sugared" symbol application e has any type of the form:  sugarSymC :: + ( InjectC expr (AST dom) (Internal x)  , Syntactic a dom  , Syntactic b dom  , ...  , Syntactic x dom I ) => expr (Internal a :-> Internal b :-> ... :-> Full (Internal x))  -> (a -> b -> ... -> x) \]^_`abcdeCDE \]^_`abcde _`abc\]^de\]^_`abcdeCDE Nonef7Class of expressions that can be treated as constructs h/A representation of a syntactic construct as a   and an evaluation B function. It is not meant to be used as a syntactic symbol in an . Its J only purpose is to provide the default implementations of functions like  3 via the f class. lDefault implementation of 3 mDefault implementation of 4 nDefault implementation of 9 oDefault implementation of > fghijklmnoFGH fghijklmno hijkfglmno fghijklmnoFGHNonekIJ  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno NonepqKLMNOPpqpqpqKLMNOP NonersQRSTUVrsrsrsQRSTUV None t/Decorating symbols with additional information  One usage of t: is to decorate every node of a syntax tree. This is done  simply by changing   AST dom sig to   AST (Decor info dom) sig  Injection/.projection of an decorated tree is done using x /  y. z)Get the decoration of the top-level node {,Update the decoration of the top-level node |LLift a function that operates on expressions with associated information to  operate on an t9 expression. This function is convenient to use together  with e.g. queryNodeSimple when the domain has the form  (t info dom). }%Collect the decorations of all nodes ~$Rendering of decorated syntax trees .Show an decorated syntax tree using ASCII art /Print an decorated syntax tree using ASCII art Strip decorations from an  tuvwxyz{|}~WXYZ[\tuvwxyz{|}~tuvwxyz{|}~tuvwxyz{|}~WXYZ[\ NoneIdentity function ]^_`ab]^_`abNonecdefgcdefgNone$Projection with explicit monad type hijklmhijklmNone.Expressions for selecting elements of a tuple These families ( - $) are needed because of the problem  described in:  Jhttp://emil-fp.blogspot.com/2011/08/fundeps-weaker-than-type-families.html $Expressions for constructing tuples #Return the selected position, e.g. K selectPos (Sel3 poly :: Select Poly ((Int,Int,Int,Int) :-> Full Int)) = 3 )nopqrstuvwxyz{|}~nopqrstuvwxyz{|}~NoneNoneAlpha-equivalence 8Environments containing a list of variable equivalences )Evaluation of expressions with variables  Let binding K is just an application operator with flipped argument order. The argument  (a -> b) is preferably constructed by . Lambda binding  Variables Variable identifier LShould be a capture-avoiding substitution, but it is currently not correct. FNote: Variables with a different type than the new expression will be  silently ignored. LBeta-reduction of an expression. The expression to be reduced is assumed to  be a . (Evaluation of possibly open expressions !Evaluation of closed expressions 1Apply a symbol denotation to a list of arguments %Convenient default implementation of  HAlpha-equivalence on lambda expressions. Free variables are taken to be . equivalent if they have the same identifier. 3? does strict identifier comparison; i.e. no alpha equivalence. 4 assigns the same hash to all  bindings. This is a valid 9 over-approximation that enables the following property:  a b ==> 4 a == 4 b3? does strict identifier comparison; i.e. no alpha equivalence. 49 assigns the same hash to all variables. This is a valid 9 over-approximation that enables the following property:  a b ==> 4 a == 4 bGVariable to be substituted Expression to substitute for Expression to substitute in  Argument Function to be reduced >NoneHigher-order lambda binding Lambda binding CTranslating expressions with higher-order binding to corresponding ' expressions using first-order binding "Reify an n-ary syntactic function  None,User interface to embedded monadic programs (One-layer desugaring of monadic actions &One-layer sugaring of monadic actions NoneBasic optimization GBottom-up optimization of an expression. The optimization performed is H up to each instance, but the intention is to provide a sensible set of  "always-appropriate"+ optimizations. The default implementation  3 does only constant folding. This constant folding / uses the set of free variables to know when it's static evaluation is A possible. Thus it is possible to help constant folding of other K constructs by pruning away parts of the syntax tree that are known not to D be needed. For example, by replacing (using ordinary Haskell as an  example)   if True then a else b with a, we don''t need to report the free variables in b . This, in F turn, can lead to more constant folding higher up in the expression. Constant folder GGiven an expression and the statically known value of that expression, L returns a (possibly) new expression with the same meaning as the original. ! Typically, the result will be a #, if the relevant type constraints  are satisfied. Optimize an expression %Convenient default implementation of  (uses  to  partially evaluate) None&Environment for the expression in the  function 2Whether the current expression is inside a lambda %Whether a given symbol can be shared ;Counting the number of occurrences of an expression in the  environment AThe set of variables that are not allowed to occur in the chosen  expression !Interface for binding constructs DSubstituting a sub-expression. Assumes no variable capturing in the  expressions involved. 4Count the number of occurrences of a sub-expression IChecks whether a sub-expression in a given environment can be lifted out !Choose a sub-expression to share 'Choose a sub-expression to share in an  environment Like 7, but does not consider the top expression for sharing @Perform common sub-expression elimination and variable hoisting Like 9 but with common sub-expression elimination and variable  hoisting Sub-expression to be replaced Replacing sub-expression Whole expression Expression to count Expression to count in  None%Pattern functor representation of an  with s "Abstract Syntax Graph" <A representation of a syntax tree with explicit sharing. An  is valid if  and only if  succeeds (and the  field is correct). Top-level expression 'Mapping from node id to sub-expression Total number of nodes "Environment for alpha-equivalence Placeholder for a syntax tree Node identifier "Show syntax graph using ASCII art #Print syntax graph using ASCII art "Update the node identifiers in an  using the supplied reindexing  function LReindex the nodes according to the given index mapping. The number of nodes L is unchanged, so if the index mapping is not 1:1, the resulting graph will  contain duplicates. %Reindex the nodes to be in the range  [0 .. l-1], where l is the number  of nodes in the graph DRemove duplicate nodes from a graph. The function only looks at the   of each node. The  field is updated accordingly. Folding over a graph >The user provides a function to fold a single constructor (an "algebra"). J The result contains the result of folding the whole graph as well as the O result of each internal node, represented both as an array and an association , list. Each node is processed exactly once.  Convert an  to an  by inlining all nodes IFind the child nodes of each node in an expression. The child nodes of a  node n* are the first nodes along all paths from n. >Count the number of occurrences of each node in an expression %Inline all nodes that are not shared HCompute a table (both array and list representation) of hash values for  each node IPartitions the nodes such that two nodes are in the same sub-list if and $ only if they are alpha-equivalent. =Common sub-expression elimination based on alpha-equivalence +##NoneA hash table from  to  (with  as the hashing ( function). I.e. it is assumed that the s at each entry all have the 6 same hash, and that this number is equal to the entry's key.  of a  (c (Full a)) with hidden result type Lookup a name in the history  !Insert the name into the history  0Return a fresh identifier from the given supply         NoneShorthand used by  GWrites out a list of encountered nodes and returns the top expression.  4Convert a syntax tree to a sharing-preserving graph :This function is not referentially transparent (hence the ). However, it M is well-behaved in the sense that the worst thing that could happen is that ; sharing is lost. It is not possible to get false sharing.  ;A function that decides whether a given node can be shared    NoneShorthand used by  GWrites out a list of encountered nodes and returns the top expression.  4Convert a syntax tree to a sharing-preserving graph  CReifying an n-ary syntactic function to a sharing-preserving graph :This function is not referentially transparent (hence the ). However, it M is well-behaved in the sense that the worst thing that could happen is that ; sharing is lost. It is not possible to get false sharing.   ;A function that decides whether a given node can be shared        !"#$%&'()*+,-.//01234567789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZZ[[\]^_`abcdefghijklmnopqrstuvwxyz{|} ~                 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO P Q RSTUSTU V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l mnopqrstuvwxyz{|}~!( syntactic-1.0 Language.Syntactic.Sharing.UtilsLanguage.Syntactic.SyntaxLanguage.Syntactic.Traversal*Language.Syntactic.Interpretation.Equality(Language.Syntactic.Interpretation.Render,Language.Syntactic.Interpretation.EvaluationLanguage.Syntactic.ConstraintLanguage.Syntactic.Sugar+Language.Syntactic.Interpretation.Semantics'Language.Syntactic.Constructs.Condition'Language.Syntactic.Constructs.Construct(Language.Syntactic.Constructs.Decoration&Language.Syntactic.Constructs.Identity%Language.Syntactic.Constructs.Literal#Language.Syntactic.Constructs.Monad#Language.Syntactic.Constructs.TupleData.DynamicAlt%Language.Syntactic.Constructs.Binding1Language.Syntactic.Constructs.Binding.HigherOrder!Language.Syntactic.Frontend.Monad.Language.Syntactic.Constructs.Binding.Optimize+Language.Syntactic.Sharing.SimpleCodeMotion Language.Syntactic.Sharing.Graph%Language.Syntactic.Sharing.StableName Language.Syntactic.Sharing.Reify"Language.Syntactic.Sharing.ReifyHOLanguage.SyntacticDListemptysingle fromDListreindexcount fullPartition:<:injProjectprj:+:InjRInjL DenResultApplySymappSym':->PartialFullresultASTFAST:$SymsizeappSymWrapFull unwrapFullArgs:*NilgmapTgmapQ everywhereUpeverywhereDownlistArgsmapArgsmapArgsAmapArgsMappArgsmatchquery simpleMatchfold simpleFoldlistFold matchTransEqualityequalexprHashToTree toTreeArgsRenderrender renderArgs printExprshowASTdrawASTEvalevaluate DenotationASTBASTEInjectCinjC ConstrainedBy ConstrainedSatexprDict:||C':|C:<subSubTop:/\:weakLweakR exprDictSub exprDictPlusappSymCliftASTE liftASTE2liftASTB liftASTB2 SyntacticNdesugarNsugarN SyntacticInternaldesugarsugarresugarsugarSym sugarSymCSemantic semantics SemanticsSem semanticName semanticEval equalDefaultexprHashDefaultrenderArgsDefaultevaluateDefault Condition ConstructDecor decorInfo decorExprinjDecorprjDecorgetInfo updateDecor liftDecor collectInfo toTreeDecor showDecor drawDecor stripDecorIdentityIdLiteralMONADWhenThenBindReturnprjMonadSelectSel7Sel6Sel5Sel4Sel3Sel2Sel1Sel7'Sel6'Sel5'Sel4'Sel3'Sel2'Sel1'TupleTup7Tup6Tup5Tup4Tup3Tup2 selectPosDynamictoDynfromDynAlphaEq alphaEqSymVarEqEnv prjVarEqEnv modVarEqEnvEvalBind evalBindSymLetLambdaVariableVarId varIntegershowVarsubst betaReduce evalBindMevalBindappDenevalBindSymDefaultalphaEqM alphaEqM2alphaEqalphaEqSymDefaultalphaEqChildrenHODomainHOLambdalambdareifyMreifyTopreifyMonunMon desugarMonad sugarMonad Optimize'Optimize optimizeSym ConstFolder optimizeMoptimizeoptimizeSymDefaultBindDict prjVariable prjLambda injVariable injLambdainjLet codeMotiondefaultBindDict reifySmartreifySmartDefaultSyntaxPFDomPFNodePFAppPF NodeDomainASG topExpression graphNodesnumNodesNodeEnvEqEnv NodeEqEnv prjNodeEqEnv modNodeEqEnvNodeNodeId nodeIntegershowNodeshowASGdrawASGreindexNodesAST reindexNodesreindexNodesFrom0nubNodes foldGraph inlineAll nodeChildren occurrences inlineSingle hashNodespartitionNodescseHistoryStNamehash lookHistoryrememberfresh reifyGraph reifyGraphTop $f:<:expr1:+:$f:<:expr1:+:0 $f:<:exprexpr $f:<:subAST$fProjectexpr1:+:$fProjectexpr1:+:0$fProjectexprexpr$fProjectsubAST$fApplySym:->(->)dom$fApplySymFullASTdomWrapAST unWrapASTdata-hash-0.2.0.0Data.Hash.BaseHash$fEq:+: $fEquality:+:$fEqAST $fEqualityASTbaseGHC.BaseStringtoTree $fToTree:+: $fToTreeAST $fShow:+: $fRender:+: $fShowAST $fRenderAST $fEval:+: $fEvalAST$fInjectCexpr1:+:sig$fInjectCexpr1:+:sig0$fInjectCexprexprsig$fInjectCsub:||sig$fInjectCsub:|sig$fInjectCsubASTsig$fConstrained:||$fConstrained:|$fConstrained:+:$fConstrainedAST $fToTree:|| $fEval:|| $fRender:|| $fEquality:||$fProjectsub:|| $fToTree:|$fEval:| $fRender:| $fEquality:|$fProjectsub:| $f:<:/\:q $f:<:/\:p$f:)(->)$fSyntacticNaia$fSyntacticASTdom$fEvalSemantics$fRenderSemantics$fEqualitySemanticsconstraints-0.3.2Data.ConstraintDict$fToTreeCondition$fEvalCondition$fRenderCondition$fEqualityCondition$fSemanticCondition$fConstrainedCondition$fToTreeConstruct$fEvalConstruct$fRenderConstruct$fEqualityConstruct$fSemanticConstruct$fConstrainedConstruct $fEvalDecor $fToTreeDecor $fRenderDecor$fEqualityDecor$fProjectsubDecor$fConstrainedDecor$fToTreeIdentity$fEvalIdentity$fRenderIdentity$fEqualityIdentity$fSemanticIdentity$fConstrainedIdentity $fEvalLiteral$fToTreeLiteral$fRenderLiteral$fEqualityLiteral$fConstrainedLiteral $fToTreeMONAD $fEvalMONAD $fRenderMONAD$fEqualityMONAD$fSemanticMONAD$fConstrainedMONAD$fSyntactic(,,,,,,)dom$fSyntactic(,,,,,)dom$fSyntactic(,,,,)dom$fSyntactic(,,,)dom$fSyntactic(,,)dom$fSyntactic(,)dom$fToTreeSelect $fEvalSelect$fRenderSelect$fEqualitySelect$fSemanticSelect$fConstrainedSelect $fToTreeTuple $fEvalTuple $fRenderTuple$fEqualityTuple$fSemanticTuple$fConstrainedTuple$fEqualityLambda$fEqualityVariable$fAlphaEqLambdaLambdadomenv$fAlphaEqVariableVariabledomenv$fAlphaEqMONADMONADdomenv$fAlphaEqDecorDecordomenv$fAlphaEqTupleTupledomenv$fAlphaEqSelectSelectdomenv$fAlphaEqLiteralLiteraldomenv$fAlphaEqLetLetdomenv$fAlphaEqIdentityIdentitydomenv!$fAlphaEqConstructConstructdomenv!$fAlphaEqConditionConditiondomenv$fAlphaEq:||:||domenv$fAlphaEq:|:|domenv$fAlphaEq:+::+:domenv $fVarEqEnv[]$fEvalBindLambda$fEvalBindVariable$fEvalBindMONAD $fEvalBindLet$fEvalBindSelect$fEvalBindTuple$fEvalBindCondition$fEvalBindLiteral$fEvalBindConstruct$fEvalBindIdentity$fEvalBindDecor $fEvalBind:|| $fEvalBind:| $fEvalBind:+: $fEvalLet $fToTreeLet $fRenderLet $fEqualityLet$fConstrainedLet$fToTreeLambda$fRenderLambda$fConstrainedLambda$fToTreeVariable$fRenderVariable$fConstrainedVariable $fShowVarId$fSyntactic(->):||$fConstrainedHOLambda$fSyntacticMon:|| $fMonadMon$fOptimizeLambda$fOptimizeVariable$fOptimizeCondition $fOptimizeLet$fOptimizeSelect$fOptimizeTuple$fOptimizeLiteral$fOptimizeConstruct$fOptimizeIdentity $fOptimize:|| $fOptimize:| $fOptimize:+:EnvchooseinLambdacanSharecounter dependencies substituteliftable chooseEnv chooseEnvSub nonTerminal independent$fFunctorSyntaxPF$fAlphaEqNodeNodedomenv $fVarEqEnv(,)$fNodeEqEnvdom(,) $fToTreeNode $fRenderNode$fConstrainedNode $fShowNodeIdSystem.Mem.StableName StableName $fEqStName GraphMonad reifyGraphMghc-prim GHC.TypesIO