!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                     non-portable experimentalsweirich@cis.upenn.edu0 A Class of representatble types A heterogeneous list Cons for a list of types An empty list of types ,Information about a datatype, including its , fully qualified name and representation of  its type arguments. %An embedding between a list of types l and  a datatype a*, based on a particular data constructor. 7 The to function is a wrapper for the constructor, the 3 from function pattern matches on the constructor. 1Representation of a data constructor includes an : embedding between the datatype and a list of other types < as well as the representation of that list of other types. A value of type R a is a representation of a type a.  !"#$%&'()*+,-./0  !"#$%&'()*+,-./2('&%$#"!   )*+,-./0    ('&%$#"!  !"#$%&'()*+,-./ non-portable experimentalsweirich@cis.upenn.edu0123456789:;<=>?@'Access a representation, given a proxy A/Transform a parameterized rep to a vanilla rep BC0123456789:;<=>?@ABC4?>=<;:987652301@ABC0112334 ?>=<;:9876556789:;<=>?@ABC non-portable experimentalsweirich@cis.upenn.edu*Given a type, produce its representation.  !"#$DFGenerate representations (both basic and parameterized) for a list of  types. E7Generate abstract representations for a list of types. %&'(DEDEDE non-portable experimentalsweirich@cis.upenn.eduFGHIJKLMNOPQRSTUVWFGHIJKLMNOPQRSTUVWWVUTSRQPONMLKJIHGFFGHIJKLMNOPQRSTUVW non-portable experimentalsweirich@cis.upenn.edu)XYZ[\]^_`SYB style monadic map type aSYB style query type bA SYB style traversal c0A datastructure to store the results of findCon de,Determine if two reps are for the same type )*f1The type-safe cast operation, explicit arguments g1The type-safe cast operation, implicit arguments h9Leibniz equality between types, explicit representations i9Leibniz equality between types, implicit representations jHeterogeneous Ordering +k<Given a list of constructor representations for a datatype, 2 determine which constructor formed the datatype. lFA fold right operation for heterogeneous lists, that folds a function G expecting a type type representation across each element of the list. m$A fold left for heterogeneous lists nA map for heterogeneous lists o5Transform a heterogeneous list in to a standard list pmapM for heterogeneous lists q,Generate a heterogeneous list from metadata r8Generate a heterogeneous list from metadata, in a monad s&Generate a normal lists from metadata t4Map a traversal across the kids of a data structure uvwxy,-z{$XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{$egfihjkcdmlnopqrsba`tuv_^]wxy[\XZYz{$XZYYZ[\\]^_`abcddefghijklmnopqrstuvwxyz{ non-portable experimentalsweirich@cis.upenn.edu/.!The type constructor for readers /01!The type constructor for queries 234)The type constructor for transformations 567)The type constructor for transformations 89|}~'Other first-class polymorphic wrappers Wrapped generic functions;  recall: [Generic c] would be legal but [Generic' c] not. 0The general scheme underlying generic functions 5 assumed by gfoldl; there are isomorphisms such as  GenericT = Generic T. 'Generic readers, say monadic builders,  i.e., produce an "a" with the help of a monad "m". Generic builders  i.e., produce an "a". !Generic monadic transformations,  i.e., take an "a" and compute an "a" Generic queries of type "r",  i.e., take any "a" and return an "r" Generic transformations,  i.e., take an "a" and return an "a" Make a generic transformation; $ start from a type-specific case;  preserve the term otherwise Make a generic query; $ start from a type-specific case;  return a constant otherwise 'Make a generic monadic transformation; $ start from a type-specific case;  resort to return otherwise 5Make a generic monadic transformation for MonadPlus;  use " const mzero"/ (i.e., failure) instead of return as default. Make a generic builder; # start from a type-specific ase; . resort to no build (i.e., mzero) otherwise Flexible type extension 8Extend a generic transformation by a type-specific case /Extend a generic query by a type-specific case @Extend a generic monadic transformation by a type-specific case BExtend a generic MonadPlus transformation by a type-specific case Extend a generic builder Extend a generic reader Left-biased choice on maybies #Choice for monadic transformations Choice for monadic queries ?Recover from the failure of monadic transformation by identity 8Recover from the failure of monadic query by a constant #|}~#|}~#|}~}~ non-portable experimentalsweirich@cis.upenn.edu6Apply a transformation everywhere in bottom-up manner 5Apply a transformation everywhere in top-down manner 5Variation on everywhere with an extra stop condition  Monadic variation on everywhere 2Apply a monadic transformation at least somewhere 6 somewhere :: MonadPlus m => GenericM m -> GenericM m 5Summarise all nodes in top-down, left-to-right order 1Get a list of all entities that meet a predicate 3Look up a subterm by means of a maybe-typed filter )Bottom-up synthesis of a data structure; < 1st argument z is the initial element for the synthesis; = 2nd argument o is for reduction of results from subterms; K 3rd argument f updates the synthesised data according to the given term ,Compute size of an arbitrary data structure 9Count the number of immediate subterms of the given term "Determine depth of the given term ;Determine the number of all suitable nodes in a given term 2Determine the number of all nodes in a given term >Determine the number of nodes of a given type in a given term :Find (unambiguously) an immediate subterm of a given type  non-portable experimentalsweirich@cis.upenn.eduA7All of the functions below are defined using instances  of the following class 9A general version of fold left, use for Fold class below :A general version of fold right, use for Fold class below :;;Given an element, return smaller elements of the same type G for example, to automatically find small counterexamples when testing 0enumerate the elements of a type, in DFS order. 2Generate elements of a type up to a certain depth  Create a zero element of a type   ' ( zero :: ((Int, Maybe Int), Float))  ((0, Nothing), 0.0)   Add together all of the Ints in a datastructure  For example:  gsum ( 1 , True, (a , Maybe 3, [] ) , Nothing)  4 <Produce all children of a datastructure with the same type. M Note that subtrees is available for all representable types. For those that > are not recursive datatypes, subtrees will always return the A empty list. But, these trivial instances are convenient to have ! for the Shrink operation below. .Recursively force the evaluation of the first  argument. For example,    deepSeq ( x , y ) z where  x = ...  y = ...    will evaluate both x and y then return z 4Force the evaluation of *datatypes* to their normal 3 forms. Other types are left alone and not forced. <=>3Fold a bindary operation left over a datastructure Multiply all elements together Ensure all booleans are true $Ensure at least one boolean is true Convert to list Count number of as that appear in the argument 4Compose all functions in the datastructure together 4Concatenate all lists in the datastructure together "Ensure property holds of all data &Ensure property holds of some element (Is an element stored in a datastructure <<< ?@ABCDEFG1Polymorphic equality, given an R1 representation HI$Minimal completion of the Ord class JTo generate the Bounded class To generate the Bounded class K%Minimal completion of the show class   <Generic unifyStep. almost identical to polymorphic equality    !   L                non-portable experimentalsweirich@cis.upenn.edu  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~M   !""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghiijklmnopqrstuvwxyz{|}~                              !"#$%&'()*##+,,-../001..234  5  6 7  8  9 : ; < = >? RepLib-0.4.0Generics.RepLib.RGenerics.RepLib.R1Generics.RepLib.DeriveGenerics.RepLib.PreludeRepsGenerics.RepLib.RepAuxGenerics.RepLib.SYB.AliasesGenerics.RepLib.SYB.SchemesGenerics.RepLib.LibGenerics.RepLib.PreludeLibGenerics.RepLib.UnifyGenerics.RepLibReprepMTupMEx:+:MNilEx:*:NilDTFixityInfixrInfixlInfixprecNonfixEmbtofromlabelsnamefixityConRAbstractDataArrowIOIOErrorRationalDoubleFloatIntegerCharIntrUnitEmbrUnitrTup2rPairEmbrListrNilEmbrConsEmbRep1rep1SatdictR1 Abstract1Data1Arrow1IO1IOError1 Rational1Double1Float1Integer1Char1Int1getRepCtoRrTup2_1rList1derivederive_abstractrTup7rTup7_1rTup6rTup6_1rTup5rTup5_1rTup4rTup4_1rTup3rTup3_1 rOrdering rOrdering1rEitherrEither1rMayberMaybe1rBoolrBool1Spine:<>ConstrTyped:::MapM1Query1 Traversal1MapMQuery TraversalValeqRcastRcastgcastRgcastcompareRfindConfoldr_lfoldl_lmap_lmapQ_lmapM_lfromTupfromTupMtoListgmapTgmapQgmapMgmapT1gmapQ1gmapM1toSpine fromSpine GenericM'GMunGM GenericQ'GQunGQ GenericT'GTunGTGeneric' unGeneric'GenericGenericRGenericBGenericMGenericQGenericTmkTmkQmkMmkMpmkRext0extTextQextMextMpextBextRorElsechoiceMpchoiceQ recoverMprecoverQ everywhere everywhere' everywhereBut everywhereM everythinglistify something synthesizegsizeglengthgdepthgcount gnodecount gtypecount gfindtypeFold foldRightfoldLeftLreducelreduceRreducerreduceLreduceDlreduceDRreduceDrreduceDShrinkshrinkShrinkDshrinkD Enumerate enumerate EnumerateD enumerateDGenerategenerate GenerateD generateDZeroDZDzeroDZerozeroGSumDgsumDGSumgsumsubtreesdeepSeqrnfrnfRdeepSeqRgsumR1zeroR1 generateR1 enumerateR1 lreduceR1 rreduceR1crushgproductgandgorflattencountcompgconcatgallganygelemShowDBoundedDOrdDEqDeqR1 compareR1 minBoundR1 maxBoundR1 showsPrecR1Occurs occursCheckSubstsubstHasVaris_varvarUnify unifyStepUnificationStateUState uConstraintsuSubst UConstraintUC UnifySubD unifyStepDsubstD occursCheckDUM UnifyErrorProxy unifyStepR1addConstraintsRL1dequeueConstraintqueueConstraintextendSubstitutionsolveUnificationsolveUnification'substR1 occursCheckR1FlagConcAbsreptyrNamerName1repconrfromrtorembrepDTreprreprs ctx_params lookupNamerepcon1repr1repr1s stringNametypeInfo simpleName tyVarBndrNameeqDTeqRTup compareMTuptoSpineR toSpineRlunRQunQMunMTunT deepSeq_lgenEnum enumerateCons showsPrecD minBoundD maxBoundDcompareDeqDeqRL1lexord compareTup getFixity unifyStepEq