Îõ³h*ù!      0.2.0.0(c) Masahiro Sakai 2024 BSD-stylemasahiro.sakai@gmail.com provisional non-portable Safe-Inferred /<ÂÄÍÛÝä£sequitur" denotes an internal state of the SEQUITUR algorithm.sequiturIsTerminalSymbol: is a class synonym for absorbing the difference between hashable <1.4.0.0 and  >=1.4.0.0.hashable-1.4.0.0 makes ! be a superclass of ". Therefore we define %type IsTerminalSymbol a = Hashable a on hashable >=1.4.0.0, while we define -type IsTerminalSymbol a = (Eq a, Hashable a) on hashable <1.4.0.0.9Also, developers can temporarily add other classes (e.g. #) to ease debugging.sequiturSince a grammar generated by SEQUITURÍ has exactly one rule for each non-terminal symbol, a grammar is represented as a mapping from non-terminal symbols (left-hand sides of the rules) to sequences of symbols (right-hand side of the rules).For example, a grammar0 ’C 1 1 21 ’C 2 22 ’C a b cis represented as ªGrammar (fromList [ (0, [NonTerminal 1, NonTerminal 1, NonTerminal 2]) , (1, [NonTerminal 2, NonTerminal 2]) , (2, [Terminal 'a', Terminal 'b', Terminal 'c']) ]) Since a grammar generated by SEQUITURå produces exactly one sequence, we can identify the grammar with the produced sequence. Therefore,  type is an instance of $, %, and &.sequiturÜA symbol is either a terminal symbol (from a user-specified type) or a non-terminal symbol.'sequiturInternal alias of sequitur(Non-terminal symbols are represented by (. The number 01 is reserved for the start symbol of the grammar. sequitur Create a new . sequiturôAdd a new symbol to the end of grammar's start production, and perform normalization to keep the invariants of the SEQUITUR algorithm. sequitur=Retrieve a grammar (as a persistent data structure) from the 's internal state. sequitur;Construct a grammar from a given sequence of symbols using SEQUITUR.) and * can also be used. sequitur-Reconstruct an input sequence from a grammar.ŸIt is lazy in the sense that you can consume from the beginning before constructing the entire sequence. This function is suitable if you just need to access the resulting sequence only once and from beginning to end. If you need to use the resulting sequence in a more complex way,  would be more suitable.This is a left-inverse of  , and is equivalent to + of $ class and , of %.sequitur A variant of   in which the result type is -.sequitur.)-based folding over the decoded sequence.ñThis function is equivalent to the following definition but is more efficient due to the utilization of sharing. decodeToMonoid f = / . 0 f .   This is equivalent to 1 of $ class.sequitur.Å-based folding over the decoded sequence of each non-terminal symbol.%For example, in the following grammar þg = Grammar (IntMap.fromList [ (0, [NonTerminal 1, Terminal 'c', NonTerminal 1]) , (1, [Terminal 'a', Terminal 'b']) ]) non-terminal symbol 0 and 1 produces "abcab" and "ab" respectively. Therefore,  f yields ÓIntMap.fromList [ (0, mconcat (map f "abcab")) , (1, mconcat (map f "ab")) ] sequitursequitursequitursequitursequitur   Safe-Inferredì23456789:      !"#$%&'()*+,*-.*/0*123$45*/6*17*-8*/89:;*<=*<>*<?*-@ABCDEFGHÉ'sequitur-0.2.0.0-DRyoTT0Z6K7K4tnKJGe036Language.Grammar.SequitursequiturPaths_sequiturBuilderIsTerminalSymbolGrammar unGrammarSymbol NonTerminalTerminalNonTerminalSymbol newBuilderaddbuildencodedecode decodeToSeqdecodeToMonoiddecodeNonTerminalsToMonoid$fFunctorSymbol$fHashableSymbol$fIsStringGrammar$fFoldableGrammar$fFunctorGrammar$fIsListGrammar$fEqNode$fHashableRule$fEqRule $fGenericNode $fEqGrammar $fShowGrammar $fEqSymbol $fOrdSymbol $fShowSymbol$fGenericSymbolghc-prim GHC.ClassesEq'hashable-1.4.7.0-GYq2DIh3AJKH95FPuGGNf4Data.Hashable.ClassHashablebaseGHC.ShowShow Data.FoldableFoldable GHC.IsListIsList Data.StringIsStringRuleId GHC.TypesIntfromList fromStringtoListcontainers-0.6.7Data.Sequence.InternalSeqGHC.BaseMonoidmconcatmapfoldMapversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDirgetDataFileName getSysconfDir