!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!portable to Hugs and GHC experimental,Lennart Kolmodin <kolmodin@dtek.chalmers.se>NoneA # is an efficient way to build lazy s. . There are several functions for constructing s, but only one G to inspect them: to extract any data, you have to turn them into lazy  s using . Internally, a  constructs a lazy  by filling byte 9 arrays piece by piece. As each buffer is filled, it is 'popped' 2 off, to become a new chunk of the resulting lazy . ) All this is hidden from the user of the . O(1). The empty Builder, satisfying    = O(1)., A Builder taking a single byte, satisfying   ( b) =  bO(1).= The concatenation of two Builders, an associative operation  with identity  , satisfying   ( x y) =  ( x) ( y)O(1). A Builder taking a  , satisfying   ( bs) =  [bs]O(1). A Builder taking a lazy  , satisfying   ( bs) = bsO(n). Extract a lazy  from a . D The construction work takes place if and when the relevant part of  the lazy  is demanded. O(1). Pop the % we have constructed so far, if any, ) yielding a new chunk in the result lazy . 'Sequence an IO operation on the buffer Get the size of the buffer 'Map the resulting list of bytestrings. Ensure that there are at least n many bytes available.  Ensure that n( many bytes are available, and then use f to write some  bytes into the memory.  Ensure that n( many bytes are available, and then use f to write some " storable values into the memory. $Write a Word16 in big endian format 'Write a Word16 in little endian format $Write a Word32 in big endian format 'Write a Word32 in little endian format $Write a Word64 in big endian format 'Write a Word64 in little endian format O(1).< A Builder taking a single native machine word. The word is = written in host order, host endian form, for the machine you're on. G On a 64 bit machine the Word is an 8 byte value, on a 32 bit machine, 6 4 bytes. Values written this way are not portable to > different endian or word sized machines, without conversion. 9Write a Word16 in native host order and host endianness. % 2 bytes will be written, unaligned. 9Write a Word32 in native host order and host endianness. % 4 bytes will be written, unaligned. %Write a Word64 in native host order. J On a 32 bit machine we write two host order Word32s, in big endian form. % 8 bytes will be written, unaligned. $! (portable)(stable)AR Safe-Inferredlike Maybe type with error msgs  added by KJ added 2/10/ 2003 by PEB  Safe-Inferredportable to Hugs and GHC. experimental,Lennart Kolmodin <kolmodin@dtek.chalmers.se>NoneIThe Get monad is just a State monad carrying around the input ByteString The parse state Run the Get monad applies a &-based parser on the input ByteString Run the Get monad applies a -based parser on the input F ByteString. Additional to the result of get it returns the number of + consumed bytes and the rest of the input.  Skip ahead n bytes. Fails if fewer than n bytes are available.  Skip ahead n bytes. No error if there isn't enough bytes. Run ga*, but return without consuming its input.  Fails if ga fails. Like , but consume the input if gma returns 'Just _'.  Fails if gma fails. Like , but consume the input if gea returns 'Right _'.  Fails if gea fails. Get the next up to n6 bytes as a lazy ByteString, without consuming them. 2Get the total number of bytes read to this point. ,Get the number of remaining unparsed bytes. : Useful for checking whether all input has been consumed. . Note that this forces the rest of the input. *Test whether all input has been consumed, - i.e. there are no remaining unparsed bytes.  An efficient / method for strict ByteStrings. Fails if fewer  than n bytes are left in the input.  An efficient : method for lazy ByteStrings. Does not fail if fewer than  n bytes are left in the input. @Get a lazy ByteString that is terminated with a NUL byte. Fails 7 if it reaches the end of input without hitting a NUL. -Get the remaining bytes as a lazy ByteString  important Pull n/ bytes from the input, as a strict ByteString. BSplit a ByteString. If the first result is consumed before the -- + second, this runs in constant heap space. 9You must force the returned tuple for that to work, e.g.  case splitAtST n xs of ) (ys,zs) -> consume ys ... consume zs  important "Read a Word8 from the monad state #Read a Word16 in big endian format &Read a Word16 in little endian format #Read a Word32 in big endian format &Read a Word32 in little endian format #Read a Word64 in big endian format &Read a Word64 in little endian format O(1).8 Read a single native machine word. The word is read in 2 host order, host endian form, for the machine you're on. On a 64 bit D machine the Word is an 8 byte value, on a 32 bit machine, 4 bytes. O(1).@ Read a 2 byte Word16 in native host order and host endianness. O(1).9 Read a Word32 in native host order and host endianness. O(1).8 Read a Word64 in native host order and host endianess. /,(Portable to Hugs and GHC. Requires MPTCsstable,Lennart Kolmodin <kolmodin@dtek.chalmers.se>None=Put merely lifts Builder into a Writer monad, applied to (). AThe PutM type. A Writer monad over the efficient Builder monoid. Run the  monad Run the  monad with a serialiser Run the , monad with a serialiser and get its result BPop the ByteString we have constructed so far, if any, yielding a % new chunk in the result ByteString. 0Efficiently write a byte into the output buffer LAn efficient primitive to write a strict ByteString into the output buffer. J It flushes the current buffer, and writes the argument into a new chunk. ?Write a lazy ByteString efficiently, simply appending the lazy ( ByteString chunks to the output buffer $Write a Word16 in big endian format 'Write a Word16 in little endian format $Write a Word32 in big endian format 'Write a Word32 in little endian format $Write a Word64 in big endian format 'Write a Word64 in little endian format O(1).1 Write a single native machine word. The word is = written in host order, host endian form, for the machine you're on. G On a 64 bit machine the Word is an 8 byte value, on a 32 bit machine, 6 4 bytes. Values written this way are not portable to > different endian or word sized machines, without conversion. O(1).: Write a Word16 in native host order and host endianness.  For portability issues see  putWordhost. O(1).: Write a Word32 in native host order and host endianness.  For portability issues see  putWordhost. O(1).% Write a Word64 in native host order J On a 32 bit machine we write two host order Word32s, in big endian form.  For portability issues see  putWordhost.  None3      !"#$%&'()*+,-./012345678 $%&'&      !"#$%&'()*+,-./012345678  Safe-Inferred9:;<=>?@ABCDEFGHIJK9;<=>?@ABCDEFGHIJK9:;<=>?@ABCDEFGHIJK Fportable to Hugs and GHC. Requires the FFI and some flexible instancesunstable,Lennart Kolmodin <kolmodin@dtek.chalmers.se>NoneLThe Binary class provides M and N, methods to encode and F decode a Haskell value to a lazy ByteString. It mirrors the Read and B Show classes for textual representation of Haskell types, and is D suitable for serialising Haskell values to disk, over the network. BFor parsing and generating simple external binary formats (e.g. C A structures), Binary may be used, but in general is not suitable ? for complex protocols. Instead use the Put and Get primitives  directly. ;Instances of Binary should satisfy the following property:   decode . encode == id  That is, the N and M' methods should be the inverse of each D other. A range of instances are provided for basic Haskell types. M!Encode a value in the Put monad. N Decode a value in the Get monad O@Encode a value using binary serialisation to a lazy ByteString. PNDecode a value from a lazy ByteString, reconstructing the original structure. Q#Lazily serialise a value to a file 'This is just a convenience function, it's defined simply as:  ' encodeFile f = B.writeFile f . encode ASo for example if you wanted to compress as well, you could use: # B.writeFile f . compress . encode R9Lazily reconstruct a value previously written to a file. 'This is just a convenience function, it's defined simply as:  1 decodeFile f = return . decode =<< B.readFile f CSo for example if you wanted to decompress as well, you could use: / return . decode . decompress =<< B.readFile f 4SLMNOPQTRUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~LMNOPQTRU2SLMNOPQTRUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  (portable)(stable)PL Safe-InferredLike 6, but returns the empty list when the input is empty. Like S, but O(n log n) instead of O(n^2), since it uses a set to lookup previous things. \ The result list is stable (the elements are returned in the order they occur), and lazy. ; Requires that the list elements can be compared by Ord. # Code ruthlessly taken from http: hpaste.org/54411 9Sorts and then groups elements given an ordering of the  elements. #Take the union of a list of lists. Like *, but fails if the argument is not found, ! instead of returning Nothing. Like !, but fails if nothing is found. Set a value in a lookup table. &Group tuples by their first elements. 9Replace all occurences of an element by another element. 3Use an ordering function as an equality predicate. :Return the given value if the boolean is true, els return . 1Returns true if the argument is Nothing or Just [] 5Apply all the functions in the list to the argument. Fixpoint iteration. /Join a number of lists by using the given glue  between the lists. (glue lists to join (( portablestablePeter Ljunglf Safe-Inferred$A sorted map also has unique keys,  i.e. 'map fst m :: SList a', if ' m :: SMap a b' 3The list must be sorted and contain no duplicates. 1Group a set of key-value pairs into a sorted map <Group a set of key-(sets-of-values) pairs into a sorted map )True is the two sets has common elements >True if the first argument is a subset of the second argument Create a set from any list. 5 This function can also be used as an alternative to nub in List.hs #the union of a list of sorted maps merging two sorted maps The union of a list of sets The union of two sets The difference of two sets The intersection of two sets A fixed point iteration The iterator function The initial set The result of the iteration  (portable)(stable)BB Safe-Inferred(Keeps both incoming and outgoing edges. 1Creates a relation from a list of related pairs. BCreates a relation from a list pairs of elements and the elements  related to them. Add a pair to the relation. %Add a list of pairs to the relation. ,Checks if an element is related to another. =Get the set of elements to which a given element is related. "Get all elements in the relation. >Keep only pairs for which both elements are in the given set. Uses  9Get the set of elements which are related to themselves. 8Keep the related pairs for which the predicate is true. %Remove keys that map to no elements. ;Get the equivalence classes from an equivalence relation. Returns  if there are cycles, and  if there are cycles. $Removes an element from a relation. F Returns the new relation, and the set of incoming and outgoing edges  of the removed element. $,The set over which the relation is defined. $ (portable)(stable)AR Safe-Inferred  analogue of maybe  add msg s to Maybe failures Thomas Hallgren' s wrap lines  is the same as sequence!!!  peb 30/5-04 +topological sorting with test of cyclicity 8topological sorting with test of cyclicity, new version /TH 2012-06-26 the generic fix point iterator $chop into separator-separated parts )if the first check fails try another one J      !"#$%&'()*+,-./J      !"#$%&'()*+,F      !"#$%&'()*+,-./ Safe-Inferred&An abstract data type that represents 2 identifiers for functions and categories in PGF. Creates a new identifier from 0 Reads an identifier from 0. The function returns 1( if the string is not valid identifier. Renders the identifier as 0 234567 2345 234567 Safe-InferredP represents a hypothesis in a type i.e. in the type A -> B, A is the hypothesis To read a type from a 0, use . Reads a  from a 0. renders type as 0 . The list 2 of identifiers is the list of all free variables 1 in the expression in order reverse to the order  of binding. 8creates a type from list of hypothesises, category and 4 list of arguments for the category. The operation  mkType [h_1,...,h_n] C [e_1,...,e_m] will create  "h_1 -> ... -> h_n -> C e_1 ... e_m 1creates hypothesis for non-dependent type i.e. A 3creates hypothesis for dependent type i.e. (x : A) Lcreates hypothesis for dependent type with implicit argument i.e. ({x} : A) 8 9:;<= 8 9<=8 9:;<= Safe-Inferred!AAn expression in the abstract syntax of the grammar. It could be C both parameter of a dependent type or an abstract syntax tree for  for some sentence. >=The equation is used to define lambda function as a sequence 1 of equations with pattern matching. The list of  represents  the patterns and the second  is the function body for this  equation. ?OThe pattern is used to define equations in the abstract syntax of the grammar. @implicit argument in pattern A wildcard B variable Cliteral DDapplication. The identifier should be constructor i.e. defined with 'data' E implicit argument in expression Flocal type signature Gvariable with de Bruijn index Hfunction or data constructor Imeta variable Jliteral K application Llambda abstraction ?Tree is the abstract syntax representation of a given sentence & in some concrete syntax. Technically  is a type synonym  of . Mfloating point constant Ninteger constant Ostring constant parses 0 as an expression renders expression as 0 . The list 2 of identifiers is the list of all free variables 1 in the expression in order reverse to the order  of binding. IConstructs an expression by applying a function to a list of expressions 6Decomposes an expression into application of function -Constructs an expression from string literal -Decomposes an expression into string literal .Constructs an expression from integer literal .Decomposes an expression into integer literal 2Constructs an expression from real number literal 2Decomposes an expression into real number literal 0Constructs an expression which is meta variable 0Checks whether an expression is a meta variable P%Compute an expression to normal form KQRSTUVWXYZ[\]^_`abc>d?e@AfBCDEFGHIJKLghMNOijklmnopqrPstuvwxFQRSTUVWXYZ[\]^_`abc>d?e@AfBCDEFGHIJKLghMNOilmnoqrPstuv.QSRLKJIHGFETUVWXYZ[cba`_^]\>d?DCBfA@eghONMijklmnopqrPstuvwx Safe-InferredThis is just a  with the language name. : A language name is the identifier that you write in the 2 top concrete or abstract module in GF after the  concrete/abstract keyword. Example:  abstract Lang = ...  concrete LangEng of Lang = ... yvalue of a flag z6type, arrity and definition of function + probability {  context of a category C ^ 2. functions of a category. The order in the list is important, I this is the order in which the type singatures are given in the source. D The termination of the exhaustive generation might depend on this. "8An abstract data type representing multilingual grammar  in Portable Grammar Format. ?|}~ !yz{"#$QRSTUVWX8 9<=\]^_`abc>d?e@AfBCDEFGHIJKLghMNOilmnoqrP|}~ !yz{"#$|}~ ! yz{"#$ Safe-Inferred%9BracketedString represents a sentence that is linearized ) as usual but we also want to retain the  ''brackets'' that 5 mark the beginning and the end of each constituent. &this is a bracket. The  is the category of  the phrase. The   is an unique identifier for 9 every phrase in the sentence. For context-free grammars 9 i.e. without discontinuous constituents this identifier A is also unique for every bracket. When there are discontinuous > phrases then the identifiers are unique for every phrase but C not for every bracket since the bracket represents a constituent. B The different constituents could still be distinguished by using  the constituent index i.e. ". If the grammar is reduplicating @ then the constituent indices will be the same for all brackets ' that represents the same constituent. '%this is the leaf i.e. a single token (BList of functions that lack linearizations in the given language. )+Show the printname of function or category *.Renders the bracketed string as string where  the brackets are shown as (S ...) where  S is the category. 8The length of the bracketed string in number of tokens. -%&'()*+-%&'()*+(%'&()*+ Safe-Inferred,6Linearizes given expression as string in the language - The same as . but does not return  the language. .7Linearizes given expression as string in all languages  available in the grammar. /BLinearizes given expression as a bracketed string in the language 05Creates a table from feature name to linearization. ( The outher list encodes the variations ,-./0,-./0,-./0 (portable)(stable)Krasimir Angelov Safe-Inferred1-If an error occurs in the typechecking phase 9 the type checker returns not a plain text error message  but a 1& structure which describes the error. 2&There is a goal that cannot be solved 31Implicit argument was passed where the type doesn' t allow it 4RSome metavariables have to be instantiated in order to complete the typechecking. 57It is not possible to infer the type of an expression. 6CSomething that is not of function type was applied to an argument. 7,The expression is not of the expected type. , The first type is the expected type, while ! the second is the inferred. The [CId] argument is the list 9 of free variables in both the expression and the type.  It should be used for the   and  functions. 85A category was applied to wrong number of arguments. ; The first integer is the number of expected arguments and + the second the number of given arguments.  The [CId]( argument is the list of free variables ( in the type. It should be used for the   function. 9!Unknown function name was found. :!Unknown category name was found. =returns the type and the De Bruijn index of a local variable 2returns the type and the name of a local variable ;3Renders the type checking error to a document. See . <;Check whether a given type is consistent with the abstract  syntax of the grammar. =/Checks an expression against a specified type. >9Tries to infer the type of a given expression. Note that 9 even if the expression is type correct it is not always 3 possible to infer its type in the GF type system. ' In this case the function returns the 5 error. K123456789:;<=>     1123456789:;<=>91 :98765432;<=>      (portable)(stable)KA Safe-InferredK0Renders abstract syntax tree in Graphviz format !?@ABCDEFGHIJKLMNO !"P#$%?@ABCDEFGHIJKLMNOP? @ABCDEFGHIJKLMNO !"P#$% Safe-InferredQ,An abstract data structure which represents = the probabilities for the different functions in a grammar. R,Renders the probability structure as string S%Reads the probabilities from a file. 0 This should be a text file where on every line 5 there is a function name followed by a real number. I The number represents the probability mass allocated for that function. L The function name and the probability should be separated by a whitespace. T8Builds probability tables. The second argument is a map < which contains the know probabilities. If some function is = not in the map then it gets assigned some probability based > on the even distribution of the unallocated probability mass  for the result category. U&Returns the default even distibution. &(compute the probability of a given tree '(rank from highest to lowest probability (Q)*+RSTU,-&'./0123 Q)*+RSTU,-&'.(Q)*+RSTU,-&'./0123 Safe-InferredV2Generates an exhaustive possibly infinite list of  abstract syntax expressions. W A variant of V which also takes as argument ; the upper limit of the depth of the generated expression. X0Generates a list of abstract syntax expressions  in a way similar to V but instead of 0 generating all instances of a given type, this  function uses a template. Y A variant of X which also takes as argument ? the upper limit of the depth of the generated subexpressions. ZBGenerates an infinite list of random abstract syntax expressions. G This is usefull for tree bank generation which after that can be used  for grammar testing. [ A variant of Z which also takes as argument ; the upper limit of the depth of the generated expression. \$Random generation based on template ]DRandom generation based on template with a limitation in the depth. VWXYZ[\]45678 VWXYZ[\]5 VWXYZ[\]45678 Safe-Inferred ^9_`a:b;cd<=> ^_`ab;cd<=> ^9_`a:b;cd<=> Safe-InferredeCThis is the construction function. Given a PGF and a Language, it D extract the lexicon for this language and build a tokenization fst  from it. ?@AeBCDEFe?@AeBCDEF portable stable Krasimir Angelov  Safe-InferredG=This function extracts the list of all completed parse trees @ that spans the whole input consumed so far. The trees are also 5 limited by the category specified, which is usually # the same as the startup category. HIJKLMNOPGQR %*HIJKLMNGHIJKLMNOPGQRNone S-An abstract data type whose values represent 4 the state in an incremental parser after an error. f-An abstract data type whose values represent - the current state in an incremental parser. gSThis data type encodes the different outcomes which you could get from the parser. h>The sentence is not complete. Only partial output is produced i\If the parsing and the type checking are successful we get a list of abstract syntax trees.  The list should be non-empty. jCThe parsing was successful but none of the trees is type correct.  The forest id ( 1) points to the bracketed string from the parser A where the type checking failed. More than one error is returned O if there are many analizes for some phrase but they all are not type correct. kIThe integer is the position in number of tokens where the parser failed. l?The input to the parser is a pair of predicates. The first one  n> selects a token from a list of suggestions from the grammar, ? actually appears at the current position in the input string.  The second one o- recognizes whether a literal with forest id   + could be matched at the current position. p:Creates an initial parsing state for a given language and  startup category. q>This function constructs the simplest possible parser input. = It checks the tokens for exact matching and recognizes only String, Int and Float literals.  The Int and Float9 literals match only if the token passed is some number.  The StringM literal always match but the length of the literal could be only one token. s*From the current state and the next token  s' computes a new state, where the token 9 is consumed and the current position is shifted by one. : If the new token cannot be accepted then an error state  is returned. tKIf the next token is not known but only its prefix (possible empty prefix)  then the t0 function can be used to calculate the possible L next words and the consequent states. This is used for word completions in  the GF interpreter. v=This function extracts the list of all completed parse trees @ that spans the whole input consumed so far. The trees are also 5 limited by the category specified, which is usually # the same as the startup category. 4STUVWXYZ[\]f^_`abcdefgghijklmnohipqrstuvjklmnopqrstuSfghijklmnohipqrstuv!STUVWXYZ[\]f^_`abcdefggkjihlmnohipqrstuvjklmnopqrstu  Safe-Inferredvwxyz{|}}vwxyz{|}! Safe-Inferred~;The tree is an evaluated expression in the abstract syntax : of the grammar. The type is especially restricted to not A allow unapplied lambda abstractions. The tree is used directly ? from the linearizer and is produced directly from the parser. meta variable literal function application  variable 7lambda abstraction. The list of variables is non-empty .Converts a tree to expression. The conversion 4 is always total, every tree is a valid expression. @Converts an expression to tree. The conversion is only partial. Q Variables and meta variables of function type and beta redexes are not allowed. ~ ~~" (portable)(stable)ARNoneConverts a pattern to tree. ww w#None$None% Safe-InferredportablestableKrasimir AngelovNonex3Reads file in Portable Grammar Format and produces  "/ structure. The file is usually produced with:  $ gf -make <grammar file name> y:Tries to parse the given string in the specified language , and to produce abstract syntax expression. z The same as { but does not return  the language. {>Tries to parse the given string with all available languages. . The returned list contains pairs of language * and list of abstract syntax expressions 5 (this is a list, since grammars can be ambiguous).  Only those languages 8 for which at least one parsing is possible are listed. | The same as y' but returns more detailed information }:This is an experimental function. Use it on your own risk 8The abstract language name is the name of the top-level  abstract module 6List of all languages available in the given grammar.  Gets the RFC 4646 language tag = of the language which the given concrete syntax implements, * if this is listed in the source grammar.  Example language tags include "en" for English,  and "en-UK" for British English. 5List of all categories defined in the given grammar. 3 The categories are defined in the abstract syntax  with the 'cat' keyword. 2The start category is defined in the grammar with  the 'startcat'- flag. This is usually the sentence category A but it is not necessary. Despite that there is a start category = defined you can parse with any category. The start category % definition is just for convenience. 5List of all functions defined in the abstract syntax 3List of all functions defined for a given category The type of a given function &Converts an expression to normal form xyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"x$#  (,.-/0~)%'& !*+y{z|}w<=>1:98765432;fpstulmnoqrgkjihvVWXYZ[\]`_^bacdeKMLNPO?@ABCDEFGHIJQTURSxyz{|}~&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcddefghijklmnopqrstuvwxyz{|}~"                     ! " # $ % & ' ( ) * + , - . / 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 { | } ~              G                                             L          !"#$%&'()*+,-./0123456789:;<=>&?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCCDEFGHIJKLMNOPPQRSFTUVWXYZ[\]^^_`abcdefghij k l m n o p q r!5!s!t!u!v!w!x!y!z"{"|"}"~"""""#######$$$$$$$$$$$$$$$$$$$$$$$%%%%%%%%%%%%%%%%%%%%gf-3.5PGFData.Binary.BuilderL Bytestring GF.Data.ErrM PGF.SignatureData.Binary.GetData.Binary.PutData.Binary.IEEE754GF.Data.TrieMap Data.BinaryGF.Data.UtilitiesGF.Data.SortedListGF.Data.RelationGF.Data.OperationsPGF.CIdPGF.TypePGF.ExprPGF.Data PGF.Macros PGF.Linearize PGF.TypeCheckText PrettyPrintPGF.VisualizeTreePGF.Probabilistic PGF.GeneratePGF.Morphology PGF.Tokenizer PGF.Forest PGF.Parse PGF.SortTopPGF.TreePGF.Paraphrase PGF.Optimize PGF.Binary PGF.PrinterCIdwildCIdmkCIdreadCIdshowCIdExprHypoTypereadTypeshowTypemkTypemkHypo mkDepHypo mkImplHypounTypeTreereadExprshowExprmkAbsunAbsmkAppunAppmkStrunStrmkIntunIntmkDoubleunDoublemkMetaunMetaLanguageLIndexFIdToken readLanguage showLanguageBracketedStringBracketLeaf missingLins showPrintNameshowBracketedStringflattenBracketedString linearize linearizeAlllinearizeAllLangbracketedLinearizetabularLinearizesTcErrorUnsolvableGoalUnexpectedImplArgUnresolvedMetaVarsCannotInferType NotFunType TypeMismatch WrongCatArgs UnknownFun UnknownCat ppTcError checkType checkExpr inferExprGraphvizOptionsnoLeavesnoFunnoCatnodeFontleafFont nodeColor leafColor nodeEdgeStyle leafEdgeStylegraphvizDefaultsgraphvizAbstractTreegraphvizDependencyTreegraphvizParseTreegraphvizBracketedString gizaAlignmentgraphvizAlignment ProbabilitiesshowProbabilitiesreadProbabilitiesFromFilemkProbabilitiesdefaultProbabilities generateAllgenerateAllDepth generateFromgenerateFromDepthgenerateRandomgenerateRandomDepthgenerateRandomFromgenerateRandomFromDepthMorphoAnalysisLemma buildMorpho lookupMorphofullFormLexicon morphoMissing mkTokenizer ParseState ParseOutputParseIncompleteParseOk TypeError ParseFailed ParseInputpiToken piLiteral initStatesimpleParseInput mkParseInput nextStategetCompletionsrecoveryStatesgetParseOutput paraphrasereadPGFparseparseAll parseAllLangparse_parseWithRecovery groupResults abstractName languages languageCode categoriesstartCat functionsfunctionsByCat functionTypecomputebrowseBuilderbytestring-0.10.0.2Data.ByteString.Lazy.Internal ByteStringtoLazyByteStringemptyData.ByteString.Lazy singletonappendfromByteStringData.ByteString.Internal fromChunksfromLazyByteStringflush unsafeLiftIOwithSize mapBuilder ensureFreewriteN writeNbytes putWord16be putWord16le putWord32be putWord32le putWord64be putWord64le putWordhost putWord16host putWord32host putWord64hostBuffer runBuilder defaultSize writeNBuffer newBufferwriteNBufferBytes shiftr_w16 shiftr_w32 shiftr_w64$fMonoidBuilderErr$fMonadPlusErr $fFunctorErrBadOk $fMonadErr constFuncs syntaxFuncsGetSrunGetget runGetStateskip uncheckedSkip lookAhead lookAheadM lookAheadEuncheckedLookAhead bytesRead remainingisEmpty getByteStringgetLazyByteStringgetLazyByteStringNulgetRemainingLazyByteStringgetBytes splitAtSTreadNgetWord8 getWord16be getWord16le getWord32be getWord32le getWord64be getWord64le getWordhost getWord16host getWord32host getWord64hostunGetputmkStatefailDescjoingetPtr shiftl_w16 shiftl_w32 shiftl_w64 $fMonadFixGet $fMonadGet $fFunctorGetPutPutMexecPutrunPutrunPutMputWord8 putByteStringputLazyByteStringunPutPairSsndStell putBuilder $fMonadPutM $fFunctorPutM ByteCountBitCount SignificandExponentSignNegativePositiveRawFloatrawWidthrawSign rawExponentrawSignificandrawExponentWidthrawSignificandWidth getFloat16be getFloat16le getFloat32be getFloat32le getFloat64be getFloat64le splitBytesmerge normalised denormalisedgetFloat putFloat32be putFloat32le putFloat64be putFloat64le splitFloat rawToBytesclampmashBitsintegerToBytesputFloat exponentWidthbiasunbiasbitCount bitsInWord8 bitShiftL bitShiftRbitSlicesliceIntpow isNegativeNaNTrieMapTrlookupnullcompose decompose insertWithunion unionWithunions unionsWithelemstoList fromListWithfromListmap mapWithKeyBinaryencodedecode encodeFile decodeFileSmallInt encodeFile_ decodeFile_unrollroll$fBinaryUArray $fBinaryArray $fBinaryTree $fBinaryFloat$fBinaryDouble $fBinarySeq$fBinaryIntMap$fBinaryIntSet $fBinaryMap $fBinarySet$fBinaryByteString$fBinaryByteString0$fBinaryEither $fBinaryMaybe $fBinary[]$fBinary(,,,,,,,,,)$fBinary(,,,,,,,,)$fBinary(,,,,,,,)$fBinary(,,,,,,)$fBinary(,,,,,)$fBinary(,,,,) $fBinary(,,,) $fBinary(,,) $fBinary(,) $fBinaryChar $fBinaryRatio$fBinaryInteger $fBinaryInt $fBinaryWord $fBinaryInt64 $fBinaryInt32 $fBinaryInt16 $fBinaryInt8$fBinaryWord64$fBinaryWord32$fBinaryWord16 $fBinaryWord8$fBinaryOrdering $fBinaryBool $fBinary()ghc-prim GHC.TypesWordbaseGHC.WordWord8Word16Word32Word64safeInitGHC.Listinitnub' Data.Listnub sortGroupByunionAlllookup'find'findtableSet buildMultiMapreplace compareEqwhenMP Control.Monadmzero nothingOrNullfoldFunsfix sameLength notLongerThan longerThan lookupListsplitsplitBy foldMergeselect updateNth updateNthM compareBybothapFstapSndapBothmapFstmapSndmapBothnlspwrapconcatSunwordsSunlinesSjoinSSMapSList groupPairs groupUnionhasCommonElementssubsetnubsortunionMapmergeMap<++><\\><**>limitRel'mkRelmkRel'relaterelates isRelatedTo allRelateddomainintersectSetRelreflexiveClosurereflexiveElements filterRel purgeEmptyequivalenceClassestopologicalSort Data.EitherLeftRightremoveRel relToList reverseReltransitiveClosurereflexiveClosure_symmetricClosuresymmetricSubrelationreflexiveSubrelation isTransitive isReflexive isSymmetric isEquivalenceisSubRelationOftsort findCyclesisEmpty' relToRel' rel'ToRelincomingoutgoingerrmaybeErr wrapLines combinationstopoTest topoTest2iterFixchunks checkAgain ErrorMonadraisehandlehandle_STMBinTreeifNulltestErrerrValerrIn lookupErr mapPairListM mapPairsMpairM checkUnique emptyBinTree isInBinTreejustLookupTree lookupTreelookupTreeManylookupTreeManyAll updateTree buildTree sorted2treemapTreemapMTree filterBinTree tree2listindent+++++-+++++++++prUpper prReplicateprTListprQuotedString prParenthprCurly prBracket prArgList prSemicList prCurlyListrestoreEscapesnumberedParagraphs prConjList prIfEmpty readIntArgappSTMstmstmrreadSTM updateSTMwriteSTMdonemapsErr mapsErrTreechecks allChecksdoUntil$fErrorMonadSTM$fErrorMonadErr $fMonadSTMGHC.BaseString Data.MaybeNothingpCIdpIdentppCId $fReadCId $fShowCIdDTyppType pHypoBindspAtomppTypeppHypoEquationPattPImplArgPWildPVarPLitPAppEImplArgETypedEVarEFunEMetaELitEAppEAbsLFltLIntLStr normalFormBindTypeImplicitExplicitppParens freshNameppExprpBindspArgEnvSigValueVImplArgVClosureVConstVGenVSuspVMetaVLitVAppEquPTildePAsMetaIdLiteralpExprpFactorpTypedpMetapLitppPatt pattScopeppBindppLitppMeta value2exprevalapply applyValuematch $fReadExpraflagsfunscats AlternativeAltBCAddrSeqIdFunIdSequenceCncFunCncCatPArg ProductionPConstPCoercePApplySymbolSymKPSymKSSymVarSymLitSymCatDotPosConcrcflags printnamescncfunslindefs sequences productions pproductions lproductionscnccatslexicon totalCatsAbstrcodegflagsabsnameabstract concretesunionPGF msgUnionPGFemptyPGFhaveSameFunsPGF fidStringfidIntfidFloatfidVar isPredefFIdlengthBracketedStringCncTypeLinTable BracketedToknBracket_LeafKPLeafKS mapConcreteslookTypelookDefisData lookValCat lookStartCatlookGlobalFlag lookAbsFlag lookConcrlookConcrComplete lookConcrFlagfunctionsToCathasLin restrictPGFdepthcftype typeOfHypo catSkeleton typeSkeletonvalCat contextLengthlookMap cidStringcidIntcidFloatcidVarppBracketedStringuntokn mkLinTable computeSeqfirstLinlinTree amapWithIndex lookupVargetVarSelector splitSelectorTcMunTcM MetaValueMGuardedMBoundMUnbound MetaStoreScopeTTypeTTyp emptyScope addScopedVarscopeEnv scopeVars scopeSizerunTcM lookupCatHyps lookupFunTypetypeGeneratorsemptyMetaStorenewMetanewGuardedMetagetMetasetMeta lookupMeta addConstrainttcTypetcHypostcHypo tcCatArgstcExprinfExprtcArg appImplArgeqTypeeqExpreqValuecheckResolvedMetaStoregenerateForMetasgenerateForForestevalType refineExpr refineExpr_ refineType refineType_ $fFunctorTcM$fMonadErrorTcErrorTcM$fMonadStatesTcM$fMonadPlusTcM $fMonadTcMPreAlignLangSeq IndexedSeqLabels getDepLabelsgenPreAlignment showIndSeqshowRelsgetOffsetIndex computeOffsetstruct tbracketstagprobTreerankTreesByProbsCStateProbsfunProbscatProbsgetProbabilitiessetProbabilities mkProbDefscomputeConstrsp_fp_ik_fk_igenerateproverestart$fSelectorIdentity $fSelector() collectWords isInMorpho morphoKnownmorphoClassifymissingWordMsgLexicon LexSymbolTokmkTrans lexiconTrans stringRegtokToRRspaces getAbsTreesForestabstrconcrforestrootlinearizeWithBrackets bracketedTokn isLindefCId foldForest $fSelectorInt ErrorStateEState ContinuationChartactiveactivespassivenextIdoffsetPState PassiveChart PassiveKeyPK ActiveChart ActiveSet ActiveKeyAKActive getPartialSeqprocesspredictupdateAtemptyAClookupAClookupACByFCatlabelsACinsertACemptyPClookupPCinsertPC arguments showInOrderisArg typesIntermtakeArgs doesReturnCat returnCat forExampleMetaLitFunVarAbs tree2expr expr2treeprTree patt2treeSubst paraphraseN paraphraseN'fromDefsubstisClosedisLinear optimizePGFupdateProductionIndices topDownFilterbottomUpFilterfilterProductionssplitLexicalRulesupdateConcretepgfMajorVersionpgfMinorVersionputArraygetArray putArray2 getArray2 decodingError$fBinaryLiteral$fBinaryProduction $fBinaryPArg$fBinarySymbol$fBinaryCncCat$fBinaryCncFun$fBinaryBindType $fBinaryType$fBinaryEquation $fBinaryPatt $fBinaryExpr$fBinaryAlternative $fBinaryConcr $fBinaryAbstr $fBinaryCId $fBinaryPGFppPGFppAbsppFlagppCatppFunppCncppCncArg ppProductionppCncFunppLinDefppSeqppCncCat ppPrintNameppSymbolppAltppStrsppFIdppFunIdppSeqIdppAll