D      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C BSDsweirich@cis.upenn.edu experimental non-portableNone !"24:JKMA class of representable typesA heterogeneous list Cons for a list of types An empty list of types lInformation 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. The to function is a wrapper for the constructor, the from function pattern matches on the constructor.Representation 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.@  !"#$%&'()*+,-./0123456789:;<=>?@ABC.  !"#$%&'()*+,-./01B*)('&%$#"!   CBA@?>=<;:98765+,43-./012"    *)('&%$#"! +,-./0123456789:;<=>?@ABC  BSDsweirich@cis.upenn.edu experimental non-portableNone !"246JKMU&Access a representation, given a proxyV.Transform a parameterized rep to a vanilla rep#DEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefDEFGHIJKLMNOPQRSTUVWX#HTSRQPONMLKJIFGDEfUVedcba`_^]\[WZXYDEFGH TSRQPONMLKJIUVWXYZ[\]^_`abcdefTBDsweirich@cis.upenn.edu experimental non-portableNone !"BJKM D)Given a type, produce its representation.E.Generate an R-type constructor representation.F<Decompose a type into a constructor and a list of arguments.GIApply a type constructor to a certain number of copies of the unit type.H=Generate the context parameters (see above) for a given type.I6Generate a context parameter for a single constructor.J*Compute the free type variables of a type.KdApply a context parameter to the right number of equality proofs to get out the promised context.gOGenerate representations (both basic and parameterized) for a list of types.h6Generate abstract representations for a list of types.SLMNOPQRSTUVWXYZ[\]^_`abcdefghijkDlmnoEpqrsFGtuvwxyHIzJ{K|}~ghghgh9LMNOPQRSTUVWXYZ[\ ]^_`abcdefhgijkDlmnoEpqrsFGtuvwxyHIzJ{K|}~ghBSDsweirich@cis.upenn.edu experimental non-portableNone !"246Mijklmnopqrstuvwxyz{ijklmnopqrstuvwxyz${{{{{{{{{{{{{{{{{{zyxwvutsrqponmlkjiijklmnopqrstuvwxyz{BSDsweirich@cis.upenn.edu experimental non-portableNone !";HJKMSYB style monadic map typeSYB style query typeA SYB style traversal/A datastructure to store the results of findCon+Determine if two reps are for the same type0The type-safe cast operation, explicit arguments0The type-safe cast operation, implicit arguments8Leibniz equality between types, explicit representations8Leibniz equality between types, implicit representationsHeterogeneous OrderingmGiven a list of constructor representations for a datatype, determine which constructor formed the datatype.A fold right operation for heterogeneous lists, that folds a function expecting a type type representation across each element of the list.#A fold left for heterogeneous listsA map for heterogeneous lists4Transform a heterogeneous list in to a standard listmapM for heterogeneous lists+Generate a heterogeneous list from metadata7Generate a heterogeneous list from metadata, in a monad%Generate a normal lists from metadata3Map a traversal across the kids of a data structure,|}~$|}~$|~}(|~}((c) The University of Pennsylvania, 2006BSDsweirich@cis.upenn.edu experimental non-portableNone!"HM The type constructor for readers(The type constructor for transformations(The type constructor for transformations&Other first-class polymorphic wrappersVWrapped generic functions; recall: [Generic c] would be legal but [Generic' c] not.}The general scheme underlying generic functions 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".HGeneric monadic transformations, i.e., take an "a" and compute an "a"DGeneric queries of type "r", i.e., take any "a" and return an "r"?Generic transformations, i.e., take an "a" and return an "a"aMake a generic transformation; start from a type-specific case; preserve the term otherwiseXMake a generic query; start from a type-specific case; return a constant otherwisehMake a generic monadic transformation; start from a type-specific case; resort to return otherwisewMake a generic monadic transformation for MonadPlus; use "const mzero" (i.e., failure) instead of return as default.hMake a generic builder; start from a type-specific ase; resort to no build (i.e., mzero) otherwiseFlexible type extension7Extend 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 caseAExtend a generic MonadPlus transformation by a type-specific caseExtend a generic builderExtend a generic readerLeft-biased choice on maybies"Choice for monadic transformationsChoice for monadic queries>Recover from the failure of monadic transformation by identity7Recover from the failure of monadic query by a constant,##'(c) The University of Pennsylvania 2006BSDsweirich@cis.upenn.edu experimental non-portableNone!"HM5Apply a transformation everywhere in bottom-up manner4Apply a transformation everywhere in top-down manner4Variation on everywhere with an extra stop conditionMonadic variation on everywheregApply a monadic transformation at least somewhere somewhere :: MonadPlus m => GenericM m -> GenericM m4Summarise all nodes in top-down, left-to-right order0Get a list of all entities that meet a predicate2Look up a subterm by means of a maybe-typed filterBottom-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; 3rd argument f updates the synthesised data according to the given term+Compute size of an arbitrary data structure8Count 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 term1Determine the number of all nodes in a given term=Determine the number of nodes of a given type in a given term9Find (unambiguously) an immediate subterm of a given type None!"0Polymorphic equality, given an R1 representation#Minimal completion of the Ord classTo generate the Bounded classTo generate the Bounded class$Minimal completion of the show class  BSDsweirich@cis.upenn.edu experimental non-portableNone !"2346M BSDsweirich@cis.upenn.edu experimental non-portableNone !"2346MNAll of the functions below are defined using instances of the following class8A general version of fold left, use for Fold class below9A general version of fold right, use for Fold class belowGiven an element, return smaller elements of the same type for example, to automatically find small counterexamples when testing/enumerate the elements of a type, in DFS order.1Generate 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 IntUs in a datastructure For example: gsum ( 1 , True, ("a", Maybe 3, []) , Nothing) 4)Produce all children of a datastructure with the same type. Note that subtrees is available for all representable types. For those that are not recursive datatypes, subtrees will always return the empty list. But, these trivial instances are convenient to have for the Shrink operation below.GRecursively force the evaluation of the first argument. For example, 6 deepSeq ( x , y ) z where x = ... y = ...  will evaluate both x and y then return zfForce the evaluation of *datatypes* to their normal forms. Other types are left alone and not forced.2Fold a bindary operation left over a datastructureMultiply all elements togetherEnsure all booleans are true#Ensure at least one boolean is trueConvert to listCount number of as that appear in the argument3Compose all functions in the datastructure together3Concatenate 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      <     <     w      None !"2346:M3;Generic unifyStep. almost identical to polymorphic equality( !"#$%&'()*+,-./0123456789:;<=>?@ABC! !"#$%&'()*+,-./0123456789:;<(210+,-./C)*%&'(#$B345A6789: !"@;?><= !"#$%&'()*+,-./0123456789:;<=>?@ABCBSDsweirich@cis.upenn.edu experimental non-portableNone!"  !"#$%&'()*+,-./01DEFGHIJKLMNOPQRSTUVWXghijklmnopqrstuvwxyz|}~          !!"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                        ! " # $ % & ' ( ) * + , - - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C DEFGHIJKLMMNOPPQRSTUVVWXYZZ[\]^_`abcdeffghijklmnopqrstuvwxyz{|}~((                                                                                                    RepLib-0.5.3.3Generics.RepLibGenerics.RepLib.RGenerics.RepLib.R1Generics.RepLib.DeriveGenerics.RepLib.PreludeRepsGenerics.RepLib.RepAuxGenerics.RepLib.SYB.AliasesGenerics.RepLib.SYB.SchemesGenerics.RepLib.PreludeLibGenerics.RepLib.AbstractRepsGenerics.RepLib.LibGenerics.RepLib.UnifybaseData.Type.EqualityRefl:~: testEquality TestEqualityReprepMTup:+:MNil:*:NilDTFixityInfixrInfixlInfixprecNonfixEmbtofromlabelsnamefixityConREqualAbstractDataArrowIOIOErrorRationalDoubleFloatIntegerCharIntrUnitEmbrUnitrTup2rPairEmbrListrNilEmbrConsEmb$fRep[]$fRep(,)$fRep()$fRep:~: $fRep(->)$fRepIO$fRepIOException $fRepRatio $fRepDouble $fRepFloat $fRepInteger $fRepChar$fRepInt$fOrdR$fEqR $fShowMTup$fShowDT$fShowRRep1rep1SatdictR1Equal1 Abstract1Data1Arrow1IO1IOError1 Rational1Double1Float1Integer1Char1Int1getRepCtoRrTup2_1rList1 $fRep1ctx[] $fRep1ctx(,) $fRep1ctx() $fRep1ctx:~: $fRep1ctx(->) $fRep1ctxIO$fRep1ctxRatio$fRep1ctxIOException$fRep1ctxDouble$fRep1ctxFloat$fRep1ctxInteger $fRep1ctxChar $fRep1ctxInt$fShowR1derivederive_abstractrBoolrBool1rMayberMaybe1rEitherrEither1 rOrdering rOrdering1rTup3rTup3_1rTup4rTup4_1rTup5rTup5_1rTup6rTup6_1rTup7rTup7_1 $fRepBoolSpine:<>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 gfindtypeShowDBoundedDOrdDEqDeqR1 compareR1 minBoundR1 maxBoundR1 showsPrecR1rMaprMap1rSetrSet1$fRepMapFold foldRightfoldLeftLreducelreduceRreducerreduceLreduceDlreduceDRreduceDrreduceDShrinkshrinkShrinkDshrinkD Enumerate enumerate EnumerateD enumerateDGenerategenerate GenerateD generateDZeroDZDzeroDZerozeroGSumDgsumDGSumgsumsubtreesdeepSeqrnfrnfRdeepSeqRgsumR1zeroR1 generateR1 enumerateR1 lreduceR1 rreduceR1crushgproductgandgorflattencountcompgconcatgallganygelemOccurs occursCheckSubstsubstHasVaris_varvarUnify unifyStepUnificationStateUState uConstraintsuSubst UConstraintUC UnifySubD unifyStepDsubstD occursCheckDUM UnifyErrorProxy unifyStepR1addConstraintsRL1 unifyStepEqdequeueConstraintqueueConstraintextendSubstitutionsolveUnificationsolveUnification'substR1 occursCheckR1 $fOccursnaa $fOccursnab $fSubstatt $fSubstatt' $fUnifynaa $fUnifynab$fSatUnifySubDreptyrepcon decomposeTyappUnits ctx_params genCtxParamtyFVapplyPfs FieldInfo fieldName fieldType ConstrInfo constrName constrBinders constrCxt constrFields isOnlyConstrTypeInfotypeName typeParams typeConstrsCtxParamcpNamecpTypecpEqscpTyVars cpPayload cpPayloadElts cpCtxNamecpSatFlagConcAbsQNunQNrNamerName1liftQNrunQNgadtCasetypeRefinementsextractParamEqualities genRefinementrfromrtorembrepDTreprreprsmkTupleTrepcon1 genSatClass genSatClassesrepr1repr1s stringNamemkConstrtypeInfo rememberOnly simpleName tyVarBndrName deriveRessderiveResMaybe deriveRes deriveResDataderiveResultConderiveResultEqderiveNoResultConderiveResDestrderiveResDestrSigderiveResDestrDeclderiveResDestrLPatderiveResDestrRPatarrappsT $fQuasiQNeqDTeqRTup compareMTuptoSpineR toSpineRl$fOrdDT$fEqDT$fTestEquality*RMTunRunMunT showsPrecD minBoundD maxBoundDcompareDeqDeqRL1lexord compareTup getFixity $fSatShowD $fSatBoundedD $fSatOrdD$fSatEqDgenEnum enumerateCons $fFoldMap $fFoldSet$fFold[] $fRreducebSet $fRreducec[] $fRreducec(,)$fRreducebBool$fRreducebChar $fRreduceb() $fRreducebInt $fLreducebSet $fLreducec[] $fLreducec(,)$fLreducebBool$fLreducebChar $fLreduceb() $fLreducebInt $fSatLreduceD $fSatRreduceD $fShrinkMap $fShrinkSet $fShrink(,) $fShrink() $fShrinkChar $fShrink[] $fShrinkInt$fMonadM$fApplicativeM $fFunctorM $fSatShrinkD$fEnumerateMap$fEnumerateSet $fEnumerate[]$fEnumerate(,) $fEnumerate()$fEnumerateBool$fEnumerateDouble$fEnumerateFloat$fEnumerateInteger$fEnumerateChar$fEnumerateInt$fSatEnumerateD $fGenerateMap $fGenerateSet $fGenerate[] $fGenerate(,) $fGenerate()$fGenerateDouble$fGenerateFloat$fGenerateInteger$fGenerateChar $fGenerateInt$fSatGenerateD $fZeroSet $fZeroMap$fZero[] $fZero(,) $fZeroBool$fZero()$fZeroIOException $fZeroDouble $fZeroFloat $fZeroInteger $fZero(->) $fZeroChar $fZeroInt $fSatZeroD $fGSumSet $fGSumMap$fGSum[] $fGSum(,) $fGSumDouble $fGSumChar $fGSumInteger$fGSum() $fGSumBool $fGSumInt $fGSumFloat $fSatGSumD