п      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~              ! " # $ % & ' ( ) * +!,!-!.!/!0!1!2!3!4!5!6!7!8!9!:!;!<!=">"?"@"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#[#\#]#^#_#`#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${$|$}$~$$$$$$$$$$$$$$%%%%%%%%%%%%%%%%%%2None!"*12346=HJKMNone!"*12346=HJKM The last Name< of a rule is the name of the syntactic type of the result.None!"*12346=HJKM CThe type class of algebra products. We have the forward signature sigF and the backtracking signature sigB. Combined via (<||) we have a new signature SigR. Returns the  of the monad variable. Returns the ]s of the objective function variables, as well as the name of the objective function itself. TODO need fun names from l and rNOTE U[ f x | x <- xs ] CompE [BindS (VarP x) (VarE xs), NoBindS (AppE (VarE f) (VarE x))] Build up the backtracking choice function. This choice function will backtrack based on the first result, then return only the second.^TODO it should be (only?) this function we will need to modify to build all algebra products.ysM can't be unboxed, as snd: of each element is a list, lazily consumed. We build up ysM as this makes fusion happen. Of course, this is a boxed vector and not as efficient, but we gain the ability to have lazily created backtracking from this!4This means strict optimization AND lazy backtracking5Transform a monadic stream monadically into a vector.)Transform a vector into a monadic stream.BGets the names used in the evaluation function. This returns one  for each variable. In case of TupleT 0 the type is ()0 and there isn't a name to go with it. We just  mkName "()"Q a name, but this might be slightly dangerous? (Not really sure if it indeed is)With AppT _ _T we have a multidim terminal and produce another hackish name to be consumed above. AppT (AppT ArrowT (AppT (AppT (ConT Data.Array.Repa.Index.:.) (AppT (AppT (ConT Data.Array.Repa.Index.:.) (ConT Data.Array.Repa.Index.Z)) (VarT c_1627675270))) (VarT c_1627675270))) (VarT x_1627675265)     &None!"*12346=HJKMNone!"*12346=HJKMThe Axiom type class+The corresponding stream being returned by Given a table, run the axiomNone!"*12346=HJKM>Constrains the behaviour of the memoizing tables. They may be  if i==j: is allowed (empty subwords or similar); or they may need " indices, or finally they can be  (only i==j7 allowed) which is useful in multi-dimensional casese." Similar to #, but terminates an argument stack.$_Finally, we need to be able to correctly build together symbols on the right-hand side of the (<<<) operator.[The default makes sure that the last (or only) argument left over is correctly assigned a Z to terminate the symbol stack.'mkStream( creates the actual stream of elements (Elm4) that will be fed to functions on the left of the (<<<)_ operator. Streams work over all monads and are specialized for each combination of arguments x and indices i.)During construction of the stream, we need to extract individual elements from symbols in production rules. An element in a stream is fixed by both, the type xt of the actual argument we want to grab (say individual characters we parse from an input) and the type of indices i we use.ElmV data constructors are all eradicated during fusion and should never show up in CORE.== acts as a static filter. If b+ is true, we keep all stream elements. If b* is false, we discard all stream elements.2 !"#$%&'()*+,-./0123456789:;<=>?@A( !"#$%&'()*+,-./0123456789:;<=>+7;:9846523/01)*+,-.'($%&A"#@?<=! >! "#$%&'()*+,-./01234657;:98=>@?<ANone!"*12346=HJKMKFor multi-dimensional terminals we need to be able to calculate how the static/variable signal changes and if the index for the inner part needs to be modified.NDHandles each individual argument within a stack of terminal symbols.P;Extracts the type of a multi-dimensional terminal argument.Q+Terminal symbols are stacked together with a tails and b head.S5Terminates a multi-dimensional terminal symbol stack.-BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmBCDEFGHIJKLMNOPQRSTUVWXY,STQRmPlkUjNOVWihgfKLMedcbIJGHEFXYa`_^BCD]\[Z!BCDEFGHIJKLMNOPQRSTVWXYZ[\]^_`abcdefghijlkUmRNone!"*12346=HJKM nopqrstuv vutsrqpon nopqrstuvNone!"*12346=HJKMwWe sometimes need {&An undefined bitset with 2 interfaces.wxyz{|}~wxyz{|~}{|wzyxwzyx{|}~ None!"*12346=HJKM None!"*12346=HJKM'None!"*12346=HJKMF !"#$%&'()*+,-./0123456789:;<=>BCDEFGHIJKLMNOPQRSTUVWXYwxyz{| None!"*12346=HJKMdA generic Character parser that reads a single character but allows passing additional information. expects a function to retrieve rF at index position, followed by the actual generic vector with data.1smart constructor for regular 1-character parsers=Smart constructor for Maybe Peeking, followed by a character.  None!"*12346=HJKM None!"*12346=HJKM(None!"*12346=HJKMNone!"*12346=HJKMNone!"*12346=HJKM)None!"*12346=HJKMNone!"*12346=HJKMNone!"*12346=HJKMNone!"*12346=HJKM*None!"*12346=HJKMNone!"*12346=HJKMNone!"*12346=HJKM+None!"*12346=HJKMNone!"*12346=HJKMNone!"*12346=HJKM,None!"*12346=HJKMNone!"*12346=HJKM- terminals return "strings", i.e. vectors of Chr#s. They allow the user to specify [ 0 .. ][ atoms to be parsed at once. It is possible to both, limit the minimal and maximal number.-NOTE gadt comments are not parsed by haddock?  None!"*12346=HJKM-None!"*12346=HJKM.None!"*12346=HJKMNone!"*12346=HJKMTODO this should go into ADP.Fusion.Table.Backtrack?, more than just tabulated syntactic vars are going to use it.#NOTE You probably need to give the monad morphism between mF and mBH so as to be able to extract forward results in the backtracking phase.None!"*12346=HJKMTODO I think we need to check cs:.c hereTODO yes, handle Empty / NonEmpty !!!None!"*12346=HJKMImmutable table.  None!"*12346=HJKMNone!"*12346=HJKMNone!"*12346=HJKM/None!"*12346=HJKM None!"*12346=HJKM 0Mutate a cell in a stack of syntactic variables.&TODO generalize to monad morphism via mmorph, package. This will allow more interesting mrphs functions that can, for example, track some state in the forward phase. (Note that this can be dangerous, we do nots want to have this state influence forward results, unless that can be made deterministic, or we'll break Bellman) (Expose the actual mutable table with an MTbl. (Should be temporary until MTbl1s get a more thorough treatment for auto-filling.Run and freeze MTblis. Since actually running the table-filling part is usually the last thing to do, we can freeze as well.?Default table filling, assuming that the forward monad is just IO.TODO generalize to MonadIO or  MonadPrim.                      None!"*12346=HJKM !"#$%&'()*  !*)(!'&%$ #"#"%$ &')(!*0None!"*12346=HJKM1None!"*12346=HJKM  !2None!"*12346=HJKM(      !!None!"*12346=HJKM+,-./0123456789:;<+,-+,-<;:9876543210/.+,-./0123456789:;<"None!"*12346=HJKM=_Apply a function to symbols on the RHS of a production rule. Builds the stack of symbols from xs using &, then hands this stack to ( together with the initial iniT telling (L that we are in the "outer" position. Once the stream has been created, we  ,5 to get just the arguments in the stack, and finally - the function f.?1Combine two RHSs to give a choice between parses.@Applies the objective function h to a stream sn. The objective function reduces the stream to a single optimal value (or some vector of co-optimal things).ASeparator between RHS symbols.BLThis separator looks much paper "on paper" and is not widely used otherwise.=>?@AB !"#$%&'()*+,-./0123456789:;<=>BCDEFGHIJKLMNOPQRSTUVWXYwxyz{|      !+,-=>?@AB=>?@AB=>?@AB=>?@A B #None!"*12346=HJKMOA single character terminalPTwo single-character terminalsQ Just a tableUTable, then single terminalVA^*_j -> A^*_{j+1} c_{j+1) !Y.synvar followed by a 2-tape character terminal3CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu0CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqu3FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefCDEtsrghijklmnopqu1CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuf$None!"*12346=HJKM|5Edges should never work as a single terminal element.}$Edges extend only in cases where in i -> j, i* actually happens to be a true interface.vwxyz{|}~vwxyz{|}~vwxyz{|}~vwxyz{|}~%None!"*12346=HJKM3456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUUVWXYZ[\]^_`abcdefghijklmnopqrstuvwwxxyyz{|}~                         !!!!! !!!"!#!$!%!&!'!(!)!*!+!,!-"."/"0"1"2"3#4#5#6#7#8#9#:#;#<#=#>#?#@#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#[#\#]#^#_#`#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$a$b$f%z%{%|%}%~%%%%%%7%%%%%a%b%f ADPfusion-0.4.0.2ADP.Fusion.QuickCheck.CommonADP.Fusion.TH.CommonADP.Fusion.TH.BacktrackADP.Fusion.SynVar.AxiomADP.Fusion.Base.ClassesADP.Fusion.Base.MultiADP.Fusion.Base.PointADP.Fusion.Base.SetADP.Fusion.Base.Subword ADP.Fusion.THADP.Fusion.Term.Chr.TypeADP.Fusion.Term.Chr.PointADP.Fusion.Term.Chr.SubwordADP.Fusion.Term.Edge.TypeADP.Fusion.Term.Edge.SetADP.Fusion.Term.Epsilon.TypeADP.Fusion.Term.Epsilon.PointADP.Fusion.Term.Epsilon.SubwordADP.Fusion.Term.Deletion.TypeADP.Fusion.Term.Deletion.PointADP.Fusion.Term.PeekIndex.Type!ADP.Fusion.Term.PeekIndex.SubwordADP.Fusion.Term.Strng.TypeADP.Fusion.Term.Strng.PointADP.Fusion.SynVar.BacktrackADP.Fusion.SynVar.IndicesADP.Fusion.SynVar.Array.TypeADP.Fusion.SynVar.Array.PointADP.Fusion.SynVar.Array.SetADP.Fusion.SynVar.Array.SubwordADP.Fusion.SynVar.Fill ADP.Fusion.SynVar.Recursive.TypeADP.Fusion.Apply ADP.FusionADP.Fusion.QuickCheck.PointADP.Fusion.QuickCheck.SetADP.Fusion.QuickCheck.Subword!ADP.Fusion.SynVar.Recursive.PointADP.Fusion.BaseADP.Fusion.Term.ChrADP.Fusion.Term.EdgeADP.Fusion.Term.EpsilonADP.Fusion.Term.DeletionADP.Fusion.Term.PeekIndexADP.Fusion.Term.StrngADP.Fusion.TermADP.Fusion.SynVar.Array#ADP.Fusion.SynVar.Recursive.SubwordADP.Fusion.SynVar.RecursiveADP.Fusion.SynVartrgetRuleResultTypeBacktrackingProductSigR<||makeBacktrackingProductInstance getMonadNamegetObjectiveNames buildLeftTypebuildRightType buildSigRTypegenClauseBacktrackgenChoiceFunctiongenAttributeFunctionrecBuildLamPatbuildRnsbuildBacktrackingChoicestreamToVectorvectorToStreamgetRuleSynVarNamesAxiom AxiomStreamaxiom TblConstraintModifyConstraint toNonEmptytoEmptyTableConstraintOnlyZeroNonEmptyEmptyOk StaticCheck CheckRight CheckLeftSBuildStackbuildMkStreammkStreamElementElmArggetArggetIdxgetOmx RuleContextContextinitialContextComplementContext Complemented InsideContext IVariableIStaticOutsideContextOLeftOf OFirstLeftORightOfOStaticElmS staticCheckminSize TFCo:R:ElmSi $fElementSi $fBuildPairTableStaticVartableStaticVartableStreamIndexS6S5S4 TermStaticVar termStaticVartermStreamIndexTerminalStreamterminalStreamTermArg TermSymbol:|MElmTSiPackTerminalStreamoPackTerminalStreamfromTerminalStreamtoTerminalStream$fTableStaticVarOutside$fTableStaticVar:.$fTableStaticVarOutside0$fTableStaticVarZ$fRuleContextOutside$fRuleContext:.$fRuleContextOutside0$fRuleContextZ $fTermStaticVarTermSymbolOutside$fTermStaticVarTermSymbol:.$fTermStaticVarMOutside$fTermStaticVarMZ$fMkStreammSOutside $fMkStreammSZ$fTerminalStreammMOutside$fTerminalStreammMZ$fMkStreammPairiTFCo:R:ElmPairi$fElementPairi$fBuildTermSymbol$fTableStaticVarPointL$fMkStreammS:.$fMkStreammSOutside0$fMkStreammSPointL$fRuleContextComplement$fRuleContextPointLThisThatNaughtNaughtThatThis undefbs2iundefi$fMkStreammSComplement$fMkStreammS:>$fMkStreammSBitSet$fRuleContext:>$fRuleContextComplement0$fRuleContextBitSet$fMkStreammSSubword$fRuleContextSubwordmakeAlgebraProductChrElmChrchrchrLeft $fBuildChr"$fTerminalStreammTermSymbolOutside$fTerminalStreammTermSymbol:.$fTermStaticVarChrOutside$fTermStaticVarChrPointL$fMkStreammPairOutside$fMkStreammPairPointL$fMkStreammPairSubwordEdgeElmEdge $fBuildEdge$fMkStreammPairComplement$fMkStreammPair:>Epsilon ElmEpsilon$fBuildEpsilon$fTermStaticVarEpsilonOutside$fTermStaticVarEpsilonPointLDeletion ElmDeletion$fBuildDeletion$fTermStaticVarDeletionOutside$fTermStaticVarDeletionPointL PeekIndex ElmPeekIndex$fBuildPeekIndexStrngElmStrngmanySsomeSstrng $fBuildStrng$fTermStaticVarStrngPointLGenBacktrackTable BacktrackBacktrackIndex toBacktrack$fBuildBacktrack TableIndices tableIndices$fTableIndicesOutside$fTableIndices:.$fTableIndicesOutside0$fTableIndicesZITbl iTblBigOrderiTblLittleOrderiTblConstraint iTblArrayiTblFun ElmBtITblElmITblBtITbl$fMkStreammBPairOutside$fMkStreammBPair:.$fMkStreammPair:. $fShowElmTFCo:R:ElmPairi0$fElementPairi0$fAxiomBacktrack $fAxiomITblTFCo:R:BacktrackITblmFmBr$fGenBacktrackTableITblmFmBr $fBuildITbl$fMkStreammBPairPointL$fMkStreammPairBitSet$fModifyConstraintBacktrack$fModifyConstraintITbl$fMkStreammPairComplement0$fMkStreammPairOutside0$fMkStreammBPairSubword TableOrdertableLittleOrder tableBigOrder MutateTables mutateTables MutateCell mutateCell ExposeTablesTableFun OnlyTablesexpose onlyTablesrunFreezeMTblsmutateTablesDefault$fMutateCellZimomi$fMutateTables:.imom$fMutateCell:.imomi$fTableOrder:. $fTableOrderZ$fExposeTablesZIReciRecConstraintiRecFromiRecToiRecFun ElmBtIRecElmIRecBtIRec $fAxiomIRecTFCo:R:BacktrackIRecmFmBr$fGenBacktrackTableIRecmFmBr $fBuildIRecApplyFunapply $fApply(->) $fApply(->)0 $fApply(->)1 $fApply(->)2 $fApply(->)3 $fApply(->)4 $fApply(->)5 $fApply(->)6 $fApply(->)7 $fApply(->)8 $fApply(->)9 $fApply(->)10 $fApply(->)11 $fApply(->)12 $fApply(->)13<<<<<#|||...~~%GetIxsRgetIxs prop_Epsilonprop_O_Epsilon prop_ZEpsilonprop_O_ZEpsilonprop_O_ZEpsilonEpsilon prop_O_ItNC prop_O_ZItNCprop_O_2dimIt_NC_CNprop_2dimIt_NC_CNprop_Ttprop_CCprop_It prop_O_Itprop_ZIt prop_O_ZItprop_ItC prop_O_ItC prop_O_ItCC prop_O_ZItCC prop_2dimItCCprop_O_2dimItCCxprop_O_ixZItCC prop_ManyS prop_SomeSprop_2dim_ManyS_ManySprop_2dim_SomeS_SomeSprop_Itbl_ManySprop_Itbl_SomeSprop_1dim_Itbl_ManySprop_1dim_Itbl_SomeSprop_2dim_Itbl_ManyS_ManySprop_2dim_Itbl_SomeS_SomeS>>>xsPxsZPxsPoxsZPoxsPPxsPPomxsPPmaxPLxsoptions customCheck $fGetIxsPairi$fGetIxsPairi0 $fGetIxsSiallProps prop_b_ii prop_b_ii_nn prop_b_iiiprop_b_iii_nnn prop_bii_i prop_bii_i_n prop_bii_e prop_bii_ie prop_bii_ie_n prop_bii_iee prop_bii_ieeeprop_bii_iee_nprop_bii_ieee_nhighBithighestB highestBIIxsBxoBxsBII prop_sv_OI prop_sv_IO prop_sv_OII prop_sv_IOI prop_sv_IIOprop_cOc prop_ccOcc prop_cOccc prop_cOcIc prop_cIcOchighestcsSxsSxoStemplate-haskellLanguage.Haskell.TH.SyntaxNamePrimitiveArray-0.6.0.0Data.PrimitiveArray.Index.ClassZTFCo:R:TblConstraintSubwordTFCo:R:TblConstraintPointRTFCo:R:TblConstraintPointLTFCo:R:TblConstraintComplementTFCo:R:TblConstraintOutsideTFCo:R:TblConstraintZTFCo:R:TblConstraint:.TFCo:R:TermArgMTFCo:R:TblConstraint:>TFCo:R:TblConstraintBitSetTFCo:R:TermArgTermSymbolvector-0.10.12.3!Data.Vector.Fusion.Stream.Monadicmap