Zg      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst u v w x y z { | } ~        !"#$%&'()*+,-./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&{&|&}&~&&&&&&&&'''''''(((((((='(c) 2010-2011 Patrick Bahr, Tom HvitvedBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None %&9:;CDOT IPolymorphic definition of a term. This formulation is more natural than 9, it leads to impredicative types in some cases, though.$A term is a context with no holes. !Phantom type that signals that a   does not contain holes. !Phantom type that signals that a   might contain holes. This data type represents contexts over a signature. Contexts are terms containing zero or more holes. The first type parameter is supposed to be one of the phantom types   and  f. The second parameter is the signature of the context. The third parameter is the type of the holes. This function converts a constant to a term. This assumes that the argument is indeed a constant, i.e. does not have a value for the argument type of the functor f. ,Convert a functorial value into a context. CCast a term over a signature to a context over the same signature. =This function unravels the given term at the topmost layer.        )(c) 2014 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)Safe +,:DQRThis type family returns TrueX if the first argument is true; otherwise it checks the second argument for duplicates.UThis type family checks whether its first argument is contained its second argument.dThis type family checks whether the list of positions given as an argument contains any duplicates.HThis type checks whether the argument (atomic) position has duplicates.!This type family turns a list of atomic position into a list of simple positions5 by recursively splitting each position of the form  Sum p1 p2 into p1 and p2.Helper type family for .If the argument is not L, this type family is the identity. Otherwise, the argument is of the form Found p?, and this type family does two things: (1) it checks whether p1 the contains duplicates; and (2) it compresses p using . If (1) finds no duplicates, Found (ComprPos p) is returned; otherwise  Ambiguous is returned.For (1) it is assumed that p does not contain  nested underneath a  or ) (i.e. only at the root or underneath a ,). We will refer to such positions below as atomic position. Positions not containing  are called simple positions. lifted to . lifted to .Helper type family for .Helper type family for .Helper type family for . Note that we could have defined this as a type synonym. But if we do that, performance becomes abysmal. I presume that the reason for this huge impact on performance lies in the fact that right-hand side of the defining equation duplicates the two arguments l and r.kThis type family takes a position type and compresses it. That means it replaces each nested occurrence of - Sum (prefix (Le Here)) (prefix (Ri Here))@ lThis type is used in its promoted form only. It represents possible results for checking for subsumptions. % indicates a subsumption was found; + indicates no such subsumption was found. J indicates that there are duplicates on the left- or the right-hand side.This type is used in its promoted form only. It represents pointers from the left-hand side of a subsumption to the right-hand side.(c) 2014 Patrick BahrBSD3Patrick Bahr <paba@di.ku.dk> experimentalnon-portable (GHC Extensions)Safe*,9:;<=DQRTThe constraint e :< p expresses that e is a component of the type p . That is, p. is formed by binary products using the type e. The occurrence of e% must be unique. For example we have Int :< (Bool,(Int,Bool)) but not Bool :< (Bool,(Int,Bool)).-This function projects the component of type e$ out or the compound value of type p. 5'(c) 2010-2011 Patrick Bahr, Tom HvitvedBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)Safe%&*+,9:;<=?DQRT %Remove annotations from a signature. !MThis class defines how to distribute an annotation over a sum of signatures. "'Inject an annotation over a signature. #(Project an annotation from a signature. $DThis data type adds a constant product (annotation) to a signature. &(Formal product of signatures (functors).) A constraint f :<: g expresses that the signature f is subsumed by g, i.e. f& can be used to construct elements in g..$Formal sum of signatures (functors).3cUtility function to case on a functor sum, without exposing the internal representation of sums. + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI !"#$%&'()*+,-./012345678+./0123IHG-*+,FEDC)45(6&'78BA@$%?>=!"# <;:9" !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI$7%7&8'8(5)5.6(c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)Safe2349:;<=ADOQRTJ?This data type denotes the composition of two functor families.L~This class represents higher-order functors (Johann, Ghani, POPL '08) which are endofunctors on the category of endofunctors.MA higher-order functor f% also maps a natural transformation g :-> h to a natural transformation  f g :-> f hO#This type represents co-cones from f to a. f :=> a is isomorphic to f :-> K aP-This type represents natural transformations.W"The parametrised constant functor.ZThe identity Functor.JKLMNOPQRSTUVWXYZ[\]^_`JKLMNOPQRSTUVWXYZ[\]LMPONZ[\WXYQRSTUV]JK JKLMNOPQRSTUVWXYZ[\]^_`J5O0P0(c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)Safe%&9:;<=OQRTg)Higher-order functors that can be folded.Minimal complete definition: i or j. ghijklmnop ghijklmnop ghijklmopnghijklmnop(c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)Safe%&9:;<=OQRTryMap each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results.PAlternative type in terms of natural transformations using functor composition :.:: ;hmapM :: Monad m => (a :-> m :.: b) -> t a :-> m :.: (t b) qrsqrsqrsqrs (c) 2014 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None :<=?DILQRu"left-biased union of two mappings.v-This operator constructs a singleton mapping.wThis is the empty mapping.xVThis function constructs the pointwise product of two maps each with a default value.ykReturns the value at the given key or returns the given default when the key is not an element of the map.zAThis type is used for numbering components of a functorial value.}lThis function numbers the components of the given functorial value with consecutive integers starting at 0.tuvwxyz{|}~ qtwuyvxz{|}~ z{|}qtuvwxy~tuvwxyz{|}~u0v1 (c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)Safe%&*+,9:;<=?DOQRTMThis class defines how to distribute an annotation over a sum of signatures.5This function injects an annotation over a signature.kThis data type adds a constant product to a signature. Alternatively, this could have also been defined as 0data (f :&: a) (g :: * -> *) e = f g e :&: a e .This is too general, however, for example for  productHHom. A constraint f :<: g expresses that the signature f is subsumed by g, i.e. f& can be used to construct elements in g.Data type defining coproducts.pUtility function to case on a higher-order functor sum, without exposing the internal representation of sums. "&'78&&'7877556 (c) 2014 Patrick BahrBSD3Patrick Bahr <paba@di.ku.dk> experimentalnon-portable (GHC Extensions)Safe*,9:;<=DQRTThe constraint e :< p expresses that e is a component of the type p . That is, p. is formed by binary products using the type e. The occurrence of e% must be unique. For example we have Int :< (Bool,(Int,Bool)) but not Bool :< (Bool,(Int,Bool)).-This function projects the component of type e$ out or the compound value of type p. &'78&'785 (c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None %&:CDOQRT1A (higher-order) term is a context with no holes.A context might contain holes.!Phantom type that signals that a  does not contain holes.!Phantom type that signals that a  might contain holes.This data type represents contexts over a signature. Contexts are terms containing zero or more holes. The first type parameter is supposed to be one of the phantom types  and . The second parameter is the signature of the context. The third parameter is the type family of the holes. The last parameter is the index/label.This function converts a constant to a term. This assumes that the argument is indeed a constant, i.e. does not have a value for the argument type of the functor f.;This function unravels the given term at the topmost layer.CCast a term over a signature to a context over the same signature.   (c) Patrick Bahr, 2011BSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None%&9:;QR Signature equality. An instance EqHF f gives rise to an instance  KEq (HTerm f). 4This function implements equality of values of type f a modulo the equality of a; itself. If two functorial values are equal in this sense, eqMod returns a g value containing a list of pairs consisting of corresponding components of the two functorial values. From an EqF functor an : instance of the corresponding term type can be derived.EqF is propagated through sums.  "(c) 2011 Patrick Bahr, Tom HvitvedBSD3Tom Hvitved <hvitved@diku.dk> experimentalnon-portable (GHC Extensions)None %&9:;QR Signature ordering. An instance OrdHF f gives rise to an instance  Ord (Term f). Ordering of terms. From an  difunctor an ; instance of the corresponding term type can be derived.  is propagated through sums. (c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None %&:DOQRT06This type represents monadic cv-coalgebras over monad m and functor f, and with domain a.0This type represents cv-coalgebras over functor f and with domain a.5This type represents monadic r-coalgebras over monad m and functor f with domain a./This type represents r-coalgebras over functor f and with domain a.3This type represents monadic r-algebras over monad m and functor f and with domain a.-This type represents r-algebras over functor f and with domain a.+This type represents monadic term algebras..This type represents monadic context function.1This type represents monadic signature functions.(This type represents term homomorphisms.&This type represents context function.>This type represents uniform signature function specification.9This type represents a monadic algebra. It is similar to ! but the return type is monadic.!This type represents multisorted f-algebras with a family e of carriers.+Construct a catamorphism for contexts over f with holes of type b, from the given algebra.0Construct a catamorphism from the given algebra.A generalisation of  from terms over f to contexts over f7, where the holes have the type of the algebra carrier.;This function applies a whole context into another context.>This function lifts a many-sorted algebra to a monadic domain.3Construct a monadic catamorphism for contexts over f with holes of type b!, from the given monadic algebra.This is a monadic version of .EThis function applies the given term homomorphism to a term/context.fThis function applies the given term homomorphism to a term/context. This is the top-down variant of .)This function composes two term algebras.6This function composes a term algebra with an algebra.bThis function applies a signature function to the given context. This is the top-down variant of .@This function applies a signature function to the given context./This function composes two signature functions.FLifts the given signature function to the canonical term homomorphism.This function lifts the given signature function to a monadic signature function. Note that term algebras are instances of signature functions. Hence this function also applies to term algebras.SThis function lifts the give monadic signature function to a monadic term algebra.LThis function lifts the given signature function to a monadic term algebra.UThis function applies the given monadic term homomorphism to the given term/context.tThis function applies the given monadic term homomorphism to the given term/context. This is a top-down variant of .QThis function applies the given monadic signature function to the given context.pThis function applies the given monadic signature function to the given context. This is a top-down variant of .1This function composes two monadic term algebras.EThis function composes a monadic term algebra with a monadic algebra FThis function composes a monadic term algebra with a monadic algebra.9This function composes two monadic signature functions. vThis function unfolds the given value to a term using the given unravelling function. This is the unique homomorphism  a -> Term f" from the given coalgebra of type a -> f a to the final coalgebra Term f. This function unfolds the given value to a term using the given monadic unravelling function. This is the unique homomorphism  a -> Term f" from the given coalgebra of type a -> f a to the final coalgebra Term f.@This function constructs a paramorphism from the given r-algebraQThis function constructs a monadic paramorphism from the given monadic r-algebraDThis function constructs an apomorphism from the given r-coalgebra.SThis function constructs a monadic apomorphism from the given monadic r-coalgebra.bThis function constructs the unique futumorphism from the given cv-coalgebra to the term algebra.rThis function constructs the unique monadic futumorphism from the given monadic cv-coalgebra to the term algebra.3333(c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None%&*9:;<=OQRTThis function transforms a function with a domain constructed from a functor to a function with a domain constructed with the same functor but with an additional annotation.ZThis function annotates each sub term of the given term with the given value (of type a).This function transforms a function with a domain constructed from a functor to a function with a domain constructed with the same functor but with an additional annotation.RThis function strips the annotations from a term over a functor with annotations. This function is similar to projectE but applies to signatures with an annotation which is then ignored.  (c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None %&*:OQRTLProject the outermost layer of a term to a sub signature. If the signature g is compound of n atomic signatures, use projectn instead.Tries to coerce a termcontext to a term0context over a sub-signature. If the signature g is compound of n atomic signatures, use  deepProjectn instead.NInject a term where the outermost layer is a sub signature. If the signature g is compound of n atomic signatures, use injectn instead. VInject a term over a sub signature to a term over larger signature. If the signature g is compound of n atomic signatures, use  deepInjectn instead. ;This function injects a whole context into another context. 3This function lifts the given functor to a context. 7This function applies the given context with hole type a to a family f) of contexts (possibly terms) indexed by a. That is, each hole h is replaced by the context f h.                     (c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None %&*:AOQRThThis function returns a list of all subterms of the given term. This function is similar to Uniplate's universe function.oThis function returns a list of all subterms of the given term that are constructed from a particular functor.This function transforms every subterm according to the given function in a bottom-up manner. This function is similar to Uniplate's  transform function.Monadic version of .gThis function computes the generic size of the given term, i.e. the its number of subterm occurrences.;This function computes the generic depth of the given term.    *(c) 2011 Patrick BahrBSD3:Patrick Bahr <paba@diku.dk>, Tom Hvitved <hvitved@diku.dk> experimentalnon-portable (GHC Extensions)None:}JKLMNOPQRSTUVWXYZ[\]     "(c) 2011 Patrick Bahr, Tom HvitvedBSD3Tom Hvitved <hvitved@diku.dk> experimentalnon-portable (GHC Extensions)None 9:;<=QR!The desugaring term homomorphism.Desugar a term.#Lift desugaring to annotated terms.Default desugaring instance.(c) 2014 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None 234:<=?IL""left-biased union of two mappings.#-This operator constructs a singleton mapping.$This is the empty mapping.%VThis function constructs the pointwise product of two maps each with a default value.&kReturns the value at the given key or returns the given default when the key is not an element of the map.'AThis type is used for numbering components of a functorial value.*lThis function numbers the components of the given functorial value with consecutive integers starting at 0.+VThis function constructs the pointwise product of two maps each with a default value. !"#$%&'()*+,-. !$"&#%'()*+,-'()*!"#$%&+,-  !"#$%&'()*+,-."0#1(c) 2010-2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None:4 This is the Q$-lifted version of 'abstractNewtype.5This function abstracts away newtype# declaration, it turns them into data declarations.6oThis function provides the name and the arity of the given data constructor, and if it is a GADT also its type.8-Same as normalCon' but expands type synonyms.99Same as normalConExp' but retains strictness annotations.:Auxiliary function to extract the first argument of a binary type application (the second argument of this function). If the second argument is NothingI or not of the right shape, the first argument is returned as a default.;Auxiliary function to extract the first argument of a type application (the second argument of this function). If the second argument is NothingI or not of the right shape, the first argument is returned as a default.<LThis function provides the name and the arity of the given data constructor.=7This function returns the name of a bound type variable@]This function provides a list (of the given length) of new names based on the given string.B~Helper function for generating a list of instances for a list of named signatures. For example, in order to derive instances  and ShowF for a signature Exp5, use derive as follows (requires Template Haskell): *$(derive [makeFunctor, makeShowF] [''Exp])CNApply a class name to type arguments to construct a type class constraint.DThis function checks whether the given type constraint is an equality constraint. If so, the types of the equality constraint are returned. FThis function lifts type class instances over sums ofsignatures. To this end it assumes that it contains only methods with types of the form f t1 .. tn -> t where f is the signature that is used to construct sums. Since this function is generic it assumes as its first argument the name of the function that is used to lift methods over sums i.e. a function of type D(f t1 .. tn -> t) -> (g t1 .. tn -> t) -> ((f :+: g) t1 .. tn -> t) where :+: is the sum type constructor. The second argument to this function is expected to be the name of that constructor. The last argument is the name of the class whose instances should be lifted over sums.23456789:;<=>?@ABCDEFG23456789:;<=>?@ABCDEFG23456789:;<=>?@ABCDEFG23456789:;<=>?@ABCDEFG+(c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None9:;HDerive an instance of R for a type constructor of any higher-order kind taking at least two arguments. HHH,(c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None:IDerive an instance of gR for a type constructor of any higher-order kind taking at least two arguments. IgII-(c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None:JDerive an instance of LR for a type constructor of any higher-order kind taking at least two arguments. JLJJ.(c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None:KDerive an instance of qR for a type constructor of any higher-order kind taking at least two arguments. KqKK/"(c) 2011 Patrick Bahr, Tom HvitvedBSD3Tom Hvitved <hvitved@diku.dk> experimentalnon-portable (GHC Extensions)None9:;TLDerive an instance of R for a type constructor of any parametric kind taking at least three arguments. LLL0(c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None:QRO Signature printing. An instance ShowHF f gives rise to an instance KShow (HTerm f). RDerive an instance of OR for a type constructor of any higher-order kind taking at least two arguments. MNOPQRMNOPQRMNOPQR1"(c) 2011 Patrick Bahr, Tom HvitvedBSD3Tom Hvitved <hvitved@diku.dk> experimentalnon-portable (GHC Extensions)None:SDerive smart constructors with products for a type constructor of any parametric kind taking at least two arguments. The smart constructors are similar to the ordinary constructors, but an  is automatically inserted. SSS2(c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None:TDerive smart constructors for a type constructor of any higher-order kind taking at least two arguments. The smart constructors are similar to the ordinary constructors, but an  is automatically inserted. TTT(c) 2010-2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None:UGiven the name of a type class, where the first parameter is a higher-order functor, lift it to sums of higher-order. Example: class HShowF f where ... is lifted as <instance (HShowF f, HShowF g) => HShowF (f :+: g) where ... .ULgqBHIJKLMNOPQRSTUBOPQMNRHLLJgIqKTSUU(c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None %&9:;QRVWXYZ[\OPQOPQVWXYZ[\(c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None%&9:;<=DOQRT]IThis multiparameter class defines functors with variables. An instance  HasVar f v denotes that values over f, might contain and bind variables of type v. ^Indicates whether the f@ constructor is a variable. The default implementation returns Nothing._,Indicates the set of variables bound by the fa constructor for each argument of the constructor. For example for a non-recursive let binding: rdata Let i e = Let Var (e i) (e i) instance HasVars Let Var where bindsVars (Let v x y) = y |-> Set.singleton v XIf, instead, the let binding is recursive, the methods has to be implemented like this: b bindsVars (Let v x y) = x |-> Set.singleton v & y |-> Set.singleton v qThis indicates that the scope of the bound variable also extends to the right-hand side of the variable binding.1The default implementation returns the empty map.kThis function substitutes variables in a context according to a partial mapping from variables to contexts.Same as ^ but it returns Nothing instead of Just v if .v@ is contained in the given set of variables.cThis combinator pairs every argument of a given constructor with the set of (newly) bound variables according to the corresponding ] type class instance.This combinator combines c with the mfmap function.This combinator combines c with the generic k function.8Convert variables to holes, except those that are bound.eCThis function checks whether a variable is contained in a context. fEThis function computes the list of variables occurring in a context. ]Algebra for checking whether a variable is contained in a term, except those that are bound.gDThis function computes the set of variables occurring in a context. hDThis function computes the set of variables occurring in a context. j)This function composes two substitutions s1 and s2O. That is, applying the resulting substitution is equivalent to first applying s2 and then s1. ]^_`abcdefghijklmwvu]^_`abcdefghij]^_ba`degfhijcuvw]^_`abcdefghijklm3(c) 2010-2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None:nDerive an instance of P for a type constructor of any first-order kind taking at least one argument. nnn4(c) 2010-2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None:oConstructor printing. q Signature printing. An instance ShowF f gives rise to an instance  Show (Term f). sDerive an instance of qP for a type constructor of any first-order kind taking at least one argument. tDerive an instance of pP for a type constructor of any first-order kind taking at least one argument. opqrstopqrstopqrst5(c) 2010-2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None:uDerive an instance of P for a type constructor of any first-order kind taking at least one argument. uuu6(c) 2010-2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None:v Signature equality. An instance EqF f gives rise to an instance  Eq (Term f). xDerive an instance of vP for a type constructor of any first-order kind taking at least one argument. vwxvwxvwx7(c) 2010-2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None:y Signature ordering. An instance OrdF f gives rise to an instance  Ord (Term f). {Derive an instance of yP for a type constructor of any first-order kind taking at least one argument. yz{yz{yz{(c) 2010-2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None%&:QR|4This function implements equality of values of type f a modulo the equality of a; itself. If two functorial values are equal in this sense, | returns a g value containing a list of pairs consisting of corresponding components of the two functorial values. }v is propagated through sums.From an v functor an : instance of the corresponding term type can be derived.|}~vw|vw||}~8(c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None:#Signature normal form. An instance  NFDataF f gives rise to an instance NFData (Term f). Derive an instance of P for a type constructor of any first-order kind taking at least one argument. 9(c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None%&:#Signature arbitration. An instance  ArbitraryF f gives rise to an instance Arbitrary (Term f). Derive an instance of  for a type constructor. Derive an instance of  for a type constructor of any first-order kind taking at least one argument. It is necessary that all types that are used by the data type definition are themselves instances of . 4This function generates a declaration of the method , for the given list of constructors using .This function generates a declaration of a generator having the given name using the given constructors, i.e., something like this: % <name> :: Gen <type> <name> = ... where <type> is the type of the given constructors. If the constructors do not belong to the same type this function fails. The generated function will generate only elements of this type using the given constructors. All argument types of these constructors are supposed to be instances of .5This function generates a declaration for the method Z using the given constructors. The constructors are supposed to belong to the same type.  '(c) 2010-2011 Patrick Bahr, Tom HvitvedBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None %&:<=OQRTK?This type represents a generalised cv-coalgebra over a functor f and carrier a. ;This type represents a monadic cv-coalgebra over a functor f and carrier a. 3This type represents a cv-coalgebra over a functor f and carrier a. 9This type represents a monadic cv-algebra over a functor f and carrier a. 1This type represents a cv-algebra over a functor f and carrier a. :This type represents a monadic r-coalgebra over a functor f and carrier a. 3This type represents an r-coalgebra over a functor f and carrier a. 8This type represents a monadic r-algebra over a functor f and carrier a. 1This type represents an r-algebra over a functor f and carrier a. 8This type represents a monadic coalgebra over a functor f and carrier a. 0This type represents a coalgebra over a functor f and carrier a. CThis type represents a monadic term homomorphism. It is similar to , but has monadic values also in the domain. 3This type represents a monadic term homomorphism. EThis type represents a monadic signature function. It is similar to , but has monadic values also in the domain. 3This type represents a monadic signature function. 0This type represents a monadic context function.*This type represents a term homomorphism. *This type represents a signature function.)This type represents a context function. 9This type represents a monadic algebra. It is similar to " but the return type is monadic. /This type represents an algebra over a functor f and carrier a. +Construct a catamorphism for contexts over f with holes of type a, from the given algebra. 1Construct a catamorphism from the given algebra. A generalisation of  from terms over f to contexts over f:, where the holes have the type of the algebra carrier. <This function applies a whole context into another context. MConvert a monadic algebra into an ordinary algebra with a monadic carrier. 3Construct a monadic catamorphism for contexts over f with holes of type a", from the given monadic algebra. AConstruct a monadic catamorphism from the given monadic algebra. A generalisation of  from terms over f to contexts over fB, where the holes have the type of the monadic algebra carrier. EThis function applies the given term homomorphism to a term/context. XApply a term homomorphism recursively to a term/context. This is a top-down variant of . Compose two term homomorphisms. BCompose an algebra with a term homomorphism to get a new algebra. DCompose a term homomorphism with a coalgebra to get a cv-coalgebra. JCompose a term homomorphism with a cv-coalgebra to get a new cv-coalgebra.AThis function applies a signature function to the given context. `This function applies a signature function to the given context. This is a top-down variant of .0This function composes two signature functions. FThis function composes a signature function with a term homomorphism.EThis function composes a term homomorphism with a signature function.<This function composes an algebra with a signature function.GLifts the given signature function to the canonical term homomorphism.Lift the given signature function to a monadic signature function. Note that term homomorphisms are instances of signature functions. Hence this function also applies to term homomorphisms. ILift the give monadic signature function to a monadic term homomorphism. BLift the given signature function to a monadic term homomorphism. AApply a monadic term homomorphism recursively to a term/context. ]Apply a monadic term homomorphism recursively to a term/context. This a top-down variant of .rThis function constructs the unique monadic homomorphism from the initial term algebra to the given term algebra. IThis function applies a monadic signature function to the given context. hThis function applies a monadic signature function to the given context. This is a top-down variant of .AThis function applies a signature function to the given context. (Compose two monadic term homomorphisms. (Compose two monadic term homomorphisms. (Compose two monadic term homomorphisms. [Compose a monadic algebra with a monadic term homomorphism to get a new monadic algebra. SCompose a monadic algebra with a term homomorphism to get a new monadic algebra. 9This function composes two monadic signature functions. (Compose two monadic term homomorphisms. 9This function composes two monadic signature functions. 9This function composes two monadic signature functions. 3Construct an anamorphism from the given coalgebra. Shortcut fusion variant of .BConstruct a monadic anamorphism from the given monadic coalgebra. 3Construct a paramorphism from the given r-algebra. CConstruct a monadic paramorphism from the given monadic r-algebra. 5Construct an apomorphism from the given r-coalgebra. DConstruct a monadic apomorphism from the given monadic r-coalgebra. This function applies # at the tip of the term.5Construct a histomorphism from the given cv-algebra. EConstruct a monadic histomorphism from the given monadic cv-algebra. 6Construct a futumorphism from the given cv-coalgebra. FConstruct a monadic futumorphism from the given monadic cv-coalgebra. BConstruct a futumorphism from the given generalised cv-coalgebra. EThis function applies a signature function after a term homomorphism.This function applies the given algebra bottom-up while applying the given term homomorphism top-down. Thereby we have no requirements on the source signature f.PFFP(c) 2010-2013 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None%&*9:;<=OQRTTransform a function with a domain constructed from a functor to a function with a domain constructed with the same functor, but with an additional annotation. Transform a function with a domain constructed from a functor to a function with a domain constructed with the same functor, but with an additional annotation. CStrip the annotations from a term over a functor with annotations. )Lift a term homomorphism over signatures f and gR to a term homomorphism over the same signatures, but extended with annotations. 1Lift a monadic term homomorphism over signatures f and g[ to a monadic term homomorphism over the same signatures, but extended with annotations. 4Annotate each node of a term with a constant value. This function is similar to projectE but applies to signatures with an annotation which is then ignored.  !"#$%&'$%&'!"# '(c) 2010-2011 Patrick Bahr, Tom HvitvedBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None%&*9:;<=OQRT LProject the outermost layer of a term to a sub signature. If the signature g is compound of n atomic signatures, use projectn instead.LProject the outermost layer of a term to a sub signature. If the signature g is compound of n atomic signatures, use projectn instead.Tries to coerce a termcontext to a term0context over a sub-signature. If the signature g is compound of n atomic signatures, use  deepProjectn instead.Tries to coerce a termcontext to a term0context over a sub-signature. If the signature g is compound of n atomic signatures, use  deepProjectn instead.NInject a term where the outermost layer is a sub signature. If the signature g is compound of n atomic signatures, use injectn instead.NInject a term where the outermost layer is a sub signature. If the signature g is compound of n atomic signatures, use injectn instead.VInject a term over a sub signature to a term over larger signature. If the signature g is compound of n atomic signatures, use  deepInjectn instead.VInject a term over a sub signature to a term over larger signature. If the signature g is compound of n atomic signatures, use  deepInjectn instead.<This function injects a whole context into another context. 4This function lifts the given functor to a context. 7This function applies the given context with hole type a to a family f) of contexts (possibly terms) indexed by a. That is, each hole h is replaced by the context f h. ().345)(.354:"(c) 2011 Patrick Bahr, Tom HvitvedBSD3Tom Hvitved <hvitved@diku.dk> experimentalnon-portable (GHC Extensions)None:Derive smart constructors with products for a type constructor of any parametric kind taking at least one argument. The smart constructors are similar to the ordinary constructors, but an " is automatically inserted. ;(c) 2010-2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None:Derive smart constructors for a type constructor of any first-order kind taking at least one argument. The smart constructors are similar to the ordinary constructors, but an  is automatically inserted. (c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None %&*:QRTbThis function returns the subterm of a given term at the position specified by the given path or Nothing' if the input term has no such subtermhThis function returns a list of all subterms of the given term. This function is similar to Uniplate's universe function.oThis function returns a list of all subterms of the given term that are constructed from a particular functor.This function transforms every subterm according to the given function in a bottom-up manner. This function is similar to Uniplate's  transform function.Monadic version of .gThis function computes the generic size of the given term, i.e. the its number of subterm occurrences.<This function computes the generic height of the given term.    (c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None*:OQRT=This type represents position representations for a functor fN. It is a function that extracts a number of components (of polymorphic type a3) from a functorial value and puts it into a list.GThis type represents algebras which have terms with thunks as carrier.*This type represents contexts with thunks.'This type represents terms with thunks.7This function turns a monadic computation into a thunk.DThis function evaluates all thunks until a non-thunk node is found.?This function first evaluates the argument term into whnf via  and then projects the top-level signature to the desired subsignature. Failure to do the projection is signalled as a failure in the monad.:This function inspects the topmost non-thunk node (using ") according to the given function. Variant of  with flipped argument positionsHThis function inspects the topmost non-thunk nodes of two terms (using ") according to the given function. #This function evaluates all thunks. This function evaluates all thunks while simultaneously projecting the term to a smaller signature. Failure to do the projection is signalled as a failure in the monad as in . %This function inspects a term (using  #) according to the given function.  Variant of   with flipped argument positions (This function inspects two terms (using  #) according to the given function.AThis combinator runs a monadic catamorphism on a term with thunks:This combinator runs a catamorphism on a term with thunks.}This combinator makes the evaluation of the given functor application strict by evaluating all thunks of immediate subterms. This combinator is a variant of  that only makes a subset of the arguments of a functor application strict. The first argument of this combinator specifies which positions are supposed to be strict.4This function decides equality of terms with thunks.                    1 1<(c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None*:QRDerive an instance of P for a type constructor of any first-order kind taking at least one argument. (c) 2010-2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None:Derive an instance of  for a type constructor. pGiven the name of a type class, where the first parameter is a functor, lift it to sums of functors. Example: class ShowF f where ... is lifted as 9instance (ShowF f, ShowF g) => ShowF (f :+: g) where ... . &Bnopqrstuvwxyz{'Bqrsoptvwxyz{un(c) 2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None %&9:;QR Instances of ! are closed under forming sums. This lifts instances of  to instances of & for the corresponding context type. This lifts instances of  to instances of ) for the corresponding context functor.This lifts instances of  to instances of " for the corresponding term type. (c) 2010-2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None %&9:;QR()*+()*+ (c) 2010-2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None%&:QR.y is propagated through sums.0From an y functor an : instance of the corresponding term type can be derived../01yzyz./01!'(c) 2010-2011 Patrick Bahr, Tom HvitvedBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None %&9:QR<=>?@ADqrqr<=>?@AD"(c) 2010-2011 Patrick BahrBSD3=Patrick Bahr <paba@diku.dk> and Tom Hvitved <hvitved@diku.dk> experimentalnon-portable (GHC Extensions)None %&9:;<=QREIThis multiparameter class defines functors with variables. An instance  HasVar f v denotes that values over f, might contain and bind variables of type v. FIndicates whether the f@ constructor is a variable. The default implementation returns Nothing.G,Indicates the set of variables bound by the fa constructor for each argument of the constructor. For example for a non-recursive let binding: hdata Let e = Let Var e e instance HasVars Let Var where bindsVars (Let v x y) = y |-> Set.singleton v XIf, instead, the let binding is recursive, the methods has to be implemented like this: b bindsVars (Let v x y) = x |-> Set.singleton v & y |-> Set.singleton v qThis indicates that the scope of the bound variable also extends to the right-hand side of the variable binding.1The default implementation returns the empty map.H[This type represents substitutions of terms, i.e. finite mappings from variables to terms.IaThis type represents substitutions of contexts, i.e. finite mappings from variables to contexts.AThis multiparameter class defines substitution of values of type t for variables of type v in values of type a. Same as F but it returns Nothing instead of Just v if .v@ is contained in the given set of variables.KThis combinator pairs every argument of a given constructor with the set of (newly) bound variables according to the corresponding E type class instance.This combinator combines K with the generic  function.This combinator combines K with the generic  function.L8Convert variables to holes, except those that are bound.]Algebra for checking whether a variable is contained in a term, except those that are bound.MCThis function checks whether a variable is contained in a context. \Algebra for generating a set of variables contained in a term, except those that are bound.NEThis function computes the list of variables occurring in a context. ODThis function computes the set of variables occurring in a context. PEThis function computes the set of variables occurring in a constant. QApply the given substitution.R)This function composes two substitutions s1 and s2O. That is, applying the resulting substitution is equivalent to first applying s2 and then s1. EFGHIJKLMNOPQRSTUV$#"EFGHIJKLMNOPQREFGHILMONPJQRK"#$EFGHIJKLMNOPQRSTUV#(c) 2010-2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None9:;<=W@This class specifies the decomposability of a functorial value. X-This function decomposes a functorial value. Y/This type represents decompositions of terms. Z:This type represents decompositions of functorial values. ]<This function computes the structure of a functorial value. ^=This function computes the arguments of a functorial value. _!This function decomposes a term. WXYZ[\]^_` WXYZ[\]^_ Z[\YWX]^_WXYZ[\]^_`$(c) 2010-2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None%&:<=/This is an auxiliary function for implementing a. It behaves similarly as match but is oblivious to non-linearity. Therefore, the substitution that is returned maps holes to non-empty lists of terms (resp. contexts in general). This substitution is only a matching substitution if all elements in each list of the substitution's range are equal. aThis function takes a context c> as the first argument and tries to match it against the term t( (or in general a context with holes in a). The context c matches the term t if there is a matching substitution s\ that maps holes to terms (resp. contexts in general) such that if the holes in the context c, are replaced according to the substitution s , the term t$ is obtained. Note that the context c might be non-linear, i.e. has multiple holes that are equal. According to the above definition this means that holes with equal holes have to be instantiated by equal terms! bThis function is similar to aO but instead of a context it matches a term with variables against a context. ab$"#EFGHIJKLMNOPQRababab%(c) 2010-2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None%&:OTcThis type represents a potential single step reduction from any input. If there is no single step then the return value is the input together with False6. Otherwise, the successor is returned together with True.dGThis type represents a potential single step reduction from any input.eBThis type represents term rewriting systems (TRSs) from signature f to signature g over variables of type v. f7This type represents term rewrite rules from signature f to signature g over variables of type v gThis type represents variables.hThis type represents recursive program schemes. iThis function tries to match the given rule against the given term (resp. context in general) at the root. If successful, the function returns the right hand side of the rule and the matching substitution. jThis function tries to match the rules of the given TRS against the given term (resp. context in general) at the root. The first rule in the TRS that matches is then used and the corresponding right-hand side as well the matching substitution is returned.kThis function tries to apply the given rule at the root of the given term (resp. context in general). If successful, the function returns the result term of the rewrite step; otherwise Nothing. lThis function tries to apply one of the rules in the given TRS at the root of the given term (resp. context in general) by trying each rule one by one using k8 until one rule is applicable. If no rule is applicable Nothing is returned. m2This is an auxiliary function that turns function f of type (t -> Maybe t) into functions f' of type  t -> (t,Bool). f' x evaluates to (y,True) if f x evaluates to Just y , and to  (x,False) if f x evaluates to NothingW. This function is useful to change the output of functions that apply rules such as l. nThis function performs a parallel reduction step by trying to apply rules of the given system to all outermost redexes. If the given term contains no redexes, Nothing is returned. oThis function performs a parallel reduction step by trying to apply rules of the given system to all outermost redexes and then recursively in the variable positions of the redexes. If the given term does not contain any redexes, Nothing is returned. pZThis function applies the given reduction step repeatedly until a normal form is reached. cdefghijklmnopcdefghijklmnophgfedcijklmnopcdefghijklmnop&(c) 2010-2011 Patrick BahrBSD3Patrick Bahr <paba@diku.dk> experimentalnon-portable (GHC Extensions)None:<= qMThis is the unification monad that is used to run the unification algorithm.r=This type represents the state for the unification algorithm.vFThis type represents errors that might occur during the unification. z(This type represents list of equations. {HThis type represents equations between terms over a specific signature. |JThis is used in order to signal a failed occurs check during unification.}KThis is used in order to signal a head symbol mismatch during unification.~JThis function applies a substitution to each term in a list of equations.uThis function returns the most general unifier of the given equations using the algorithm of Martelli and Montanari. QThis function runs a unification monad with the given initial list of equations.qrstuvwxyz{|}~qrstuvywxz{|}~{zvwxy|}~rstuqqrstuvwxyz{|}~='(c) 2010-2011 Patrick Bahr, Tom HvitvedBSD3:Patrick Bahr <paba@diku.dk>, Tom Hvitved <hvitved@diku.dk> experimentalnon-portable (GHC Extensions)None:  !"#$%&'().345vwyz|'"(c) 2011 Patrick Bahr, Tom HvitvedBSD3Tom Hvitved <hvitved@diku.dk> experimentalnon-portable (GHC Extensions)None *9:;<=QR!The desugaring term homomorphism.Desugar a term.#Lift desugaring to annotated terms.Default desugaring instance.(None9:The ` algebra of a functor. The default instance creates a tree with the same structure as the term.Convert a term to a Show a term using ASCII artPrint a term using ASCII art0Write a term to an HTML file with foldable nodes>?@>ABCDECDFCDGHIJHIKLMNOPQMPRSTUVWXYZ[\]^_`abcdefgghhijklmnopqrstuvwxyz{|}~    b c d e f g g i j k l m n o p q u v w \ ] a M N O P Q M P R S V T U         !"#$%&'()*+,-./0123456789:;;<=>?@ABCDEFGHIJKLMNO+P,Q-R.S/T0U0V0W0X0Y0Z1[2\]^_`abcdefghijklmnopqrstu3v4w4x4y4z4{4|5}6~66777888999999      $%!"#:[;\&'()*-<<<]             !!_!!!!!!!"e"f"g"h"i""k"l"m"n"o"p"q"r"s"t""u######### # $ $ % %%%%%%%%%%%%%&&&&&&&& &&!&"&#&$&%&&&'&(&)&*&+&,'/'0'1'2'3'4'5(-(.(/(0(1(2(3)4)5)6)7)8)9):);)<)=)>)?)@>AB)C)D)E)F)G)H)I)J)K)L)M)N)OPQn 6 6 P Q n>ARSTUSTV6>AW,X,Y,Z-X.X/[0x\]^_`abcdde3X3Y4f4g5X5Y7[9h9i9jklmnopqrstJ<u<v<w<x<y"\"]"z>A{"|>?}"`"a$~$compdata-0.11-9FQG0hVaPcDJeuJLRT7IykData.Comp.DeriveData.Comp.MappingData.Comp.TermData.Comp.Projection Data.Comp.OpsData.Comp.Multi.HFunctorData.Comp.Multi.HFoldableData.Comp.Multi.HTraversableData.Comp.Multi.MappingData.Comp.Multi.OpsData.Comp.Multi.ProjectionData.Comp.Multi.TermData.Comp.Multi.EqualityData.Comp.Multi.OrderingData.Comp.Multi.AlgebraData.Comp.Multi.AnnotationData.Comp.Multi.SumData.Comp.Multi.GenericData.Comp.Multi.DesugarData.Comp.Derive.UtilsData.Comp.Multi.DeriveData.Comp.Multi.ShowData.Comp.Multi.VariablesData.Comp.EqualityData.Comp.AlgebraData.Comp.Annotation Data.Comp.SumData.Comp.GenericData.Comp.ThunkData.Comp.ArbitraryData.Comp.DeepSeqData.Comp.OrderingData.Comp.ShowData.Comp.VariablesData.Comp.DecomposeData.Comp.MatchingData.Comp.TermRewritingData.Comp.UnificationData.Comp.DesugarData.Comp.RenderData.Comp.SubsumeCommonData.Comp.MultiData.Comp.Multi.Derive.Equality Data.Comp.Multi.Derive.HFoldableData.Comp.Multi.Derive.HFunctor#Data.Comp.Multi.Derive.HTraversableData.Comp.Multi.Derive.OrderingData.Comp.Multi.Derive.Show)Data.Comp.Multi.Derive.SmartAConstructors(Data.Comp.Multi.Derive.SmartConstructorsData.Comp.Derive.TraversableData.Comp.Derive.ShowData.Comp.Derive.FoldableData.Comp.Derive.EqualityData.Comp.Derive.OrderingData.Comp.Derive.DeepSeqData.Comp.Derive.Arbitrary#Data.Comp.Derive.SmartAConstructors"Data.Comp.Derive.SmartConstructorsData.Comp.Derive.HaskellStrict Data.Compbase Data.FoldableFoldableData.Traversable Traversable'QuickCheck-2.8.2-FAg8rAKOyBEH07jaBqakkITest.QuickCheck.Arbitraryshrink arbitrary Arbitrarydeepseq-1.4.2.0Control.DeepSeqrnfNFDataPTermTermContextNoHoleHoleCxtConst constTermsimpCxttoCxtunTerm$fTraversableCxt $fFoldableCxt $fMonadCxt$fApplicativeCxt $fFunctorCxt:<pr$fProjFound(,)g$fProjFoundf(,)$fProjFoundf(,)0 $fProjFoundffRemAremADistAnninjectAprojectA:&::*::=::<:Subsumeinj'prj'Elem:+:InlInrfromInlfromInrcaseFinjprojsplffstfsnd$fDistAnnk:+:p:+:$fDistAnnkfp:&: $fRemAk:&:f $fRemAk:+::+:$fTraversable:&: $fFoldable:&: $fFunctor:&:$fTraversable:*: $fFoldable:*: $fFunctor:*:$fSubsumeFound:+:g$fSubsumeFoundf:+:$fSubsumeFoundf:+:0$fSubsumeFoundff$fTraversable:+: $fFoldable:+: $fFunctor:+::.:CompHFunctorhfmapNatM:=>:->AunAEunEKunKIunIrunE$fHFunctorCompose$fOrdK$fEqK $fFunctorI $fFoldableI$fTraversableI $fFunctorK $fFoldableK$fTraversableK HFoldablehfoldhfoldMaphfoldrhfoldlhfoldr1hfoldl1htoListkfoldrkfoldl HTraversablehmapM htraverseMapping&|->emptyprodMapfindWithDefaultNumbered unNumberednumber lookupNumMap$fMappingNumMapNumbered$fFunctorNumMapcaseH$fDistAnn:+:p:+:$fDistAnnfp:&: $fRemA:&:f $fRemA:+::+:$fHTraversable:&:$fHFoldable:&: $fHFunctor:&:$fHTraversable:+:$fHFoldable:+: $fHFunctor:+:$fProjFound:*:g$fProjFoundf:*:$fProjFoundf:*:0$fHTraversableCxt$fHFoldableCxt $fHFunctorCxtEqHFeqHFKEqkeqheqMod$fEqCxt$fKEqCxt $fEqHFCxt $fEqHF:+:$fEqE$fKEqKOrdHF compareHFKOrdkcompare$fOrdCxt $fKOrdCxt $fOrdHFCxt $fOrdHF:+:$fKOrdK$fOrdECVCoalgMCVCoalgRCoalgMRCoalgRAlgMRAlgCoalgMCoalgHomMCxtFunMSigFunMHomCxtFunSigFunAlgMAlgfreecatacata'appCxtliftMAlgfreeMcataMcataM'appHomappHom'compHomcompAlg appSigFun' appSigFun compSigFunhomsigFunMhom'homMappHomMappHomM' appSigFunM appSigFunM'compHomMcompAlgM compAlgM' compSigFunManaanaMparaparaMapoapoMfutufutuMliftAannliftA'stripApropAnnproject'project deepProjectinject deepInjectsplit injectCxtliftCxt substHoles injectConst projectConstsubterms subterms' transform transformMquerysubssubs'sizedepthDesugardesugHom desugHom'desugardesugarA $fDesugarfg $fDesugar:+:hNumMap prodMapWith lookupNumMap'$fFoldableNumMap$fTraversableNumMapDataInfoabstractNewtypeQabstractNewtype normalCon normalCon' normalConExpnormalConStrExp getBinaryFArg getUnaryFArgabstractConType tyVarBndrName containsType containsType'newNames tupleTypesderivemkClassPisEqualP mkInstanceD liftSumGenfindSigmakeEqHF makeHFoldable makeHFunctormakeHTraversable makeOrdHFKShowkshowShowHFshowHFshowHF' makeShowHFsmartAConstructorssmartConstructorsliftSum $fShowHF:&: $fShowCxt $fKShowCxt $fShowHFCxt$fKShowK $fKShowK0 $fShowHF:+:HasVarsisVar bindsVarsSubstCxtSubstGSubst getBoundVars varsToHoles containsVar variableList variables variables'appSubst compSubst$fSubstVarsvtf$fSubstVarsvCxtCxt $fHasVars:+:vmakeTraversable ShowConstr showConstrShowFshowF makeShowFmakeShowConstr makeFoldableEqFeqFmakeEqFOrdFcompareFmakeOrdFeqMod$fEqF:+:$fEqFCxt$fEqF(,,,,,,,,,)$fEqF(,,,,,,,,)$fEqF(,,,,,,,) $fEqF(,,,,,,) $fEqF(,,,,,) $fEqF(,,,,) $fEqF(,,,) $fEqF(,,)$fEqF(,)$fEqF[] $fEqFMaybeNFDataFrnfF makeNFDataF ArbitraryF arbitraryF' arbitraryFshrinkF makeArbitrarymakeArbitraryFCVCoalg'CVAlgMCVAlgHomMDSigFunMDalgM compCoalg compCVCoalg compSigFunHom compHomSigFun compAlgSigFunhomMD appSigFunMDcompSigFunHomMcompHomSigFunMcompAlgSigFunMana'histohistoMfutu'propAnnMproject_ deepProject_inject_ deepInject_ substHoles'$fEq:+:$fOrd:+: $fShow:+: getSubterm transform'gsizeheightAlgTCxtTTermTthunkwhnfwhnf'whnfPreval#>eval2nfnfPrdeepEval#>> deepEval2cataTMcataTstrictstrictAteqT haskellStricthaskellStrict'makeHaskellStrict makeNFData$fArbitraryF:+:$fArbitraryCxt$fArbitraryFCxt$fArbitraryF:&:$fArbitraryCxt0$fArbitraryF(,,,,,,,,,)$fArbitraryF(,,,,,,,,)$fArbitraryF(,,,,,,,)$fArbitraryF(,,,,,,)$fArbitraryF(,,,,,)$fArbitraryF(,,,,)$fArbitraryF(,,,)$fArbitraryF(,,)$fArbitraryF(,)$fArbitraryF[]$fArbitraryFMaybe $fNFDataF:&: $fNFDataCxt $fNFDataF:+: $fNFDataF(,) $fNFDataF[]$fNFDataFMaybe $fOrdF:+: $fOrdFCxt$fOrdF(,,,,,,,,,)$fOrdF(,,,,,,,,)$fOrdF(,,,,,,,)$fOrdF(,,,,,,) $fOrdF(,,,,,) $fOrdF(,,,,) $fOrdF(,,,) $fOrdF(,,) $fOrdF(,)$fOrdF[] $fOrdFMaybe $fShowF:&: $fShowFCxt $fShowF:+:$fShowConstr:&: $fShowF(,) $fShowF[] $fShowFMaybe$fShowConstr:+: substVars $fHasVars:&:v Decomposedecomp DecompTermDecompVarFun structure arguments decompose $fDecomposefvmatchCxt matchTermBStepStepTRSRuleRPS matchRule matchRulesappRuleappTRSbStep parTopStep parallelStepreduceUnifyM UnifyStateusEqsusSubst UnifErrorFailedOccursCheckHeadSymbolMismatch EquationsEquationfailedOccursCheckheadSymbolMismatch appSubstEqunify runUnifyM withNextEqputEqs putBindingrunUnify unifyStepRender stringTreeAlg stringTreeshowTermdrawTerm writeHtmlTerm $fRender:+:OrDupl'FindDupl'DuplToListCheckComprEmbFoundComprPosSumLeRiLe'GHC.BaseMaybeRi'Combine CombineMaybe CombineRecEmbNotFound AmbiguousPosSum'ChooseProxyPHereProjpr'Justghc-prim GHC.ClassesEqOrdFunctoriteriter'iterSpcompList SubstVarsisVar'hfmapBoundVarshfoldlBoundVarscontainsVarAlg variablesAlgSubstFunsubstFunCunCshowConshowCon'generateArbitraryFDeclgenerateGenDeclgenerateShrinkFDecl compHomM' compHomM_compSigFunHomM' projectTip appSigFunHom appAlgHomMbuild appAlgHom appHomHomM appSigFunHomM HaskellStrict thunkSequencethunkSequenceInjectthunkSequenceInject' deepThunk fmapBoundVarsfmapfoldlBoundVarsfoldl matchCxt'containers-0.5.7.1 Data.TreeTree