!G      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ #(c) 2008--2010 Universiteit UtrechtBSD3generics@haskell.org experimental non-portableSafeHEmultirecsDatatype to represent the fixity of a constructor. An infix declaration directly corresponds to an application of .multirec[Class for datatypes that represent data constructors. For non-symbolic constructors, only L has to be defined. The weird argument is supposed to be instantiated with C$ from base, hence the complex kind.   #(c) 2008--2010 Universiteit UtrechtBSD3generics@haskell.org experimental non-portableSafe&'HUVL4#(c) 2008--2010 Universiteit UtrechtBSD3generics@haskell.org experimental non-portableSafe &'@AHSUVX&@multirec.Semi-decidable equality for types of a family.multirecBClass that contains the shallow conversion functions for a family.multirec"Class for the members of a family.multirec7Type family describing the pattern functor of a family.multirecUnlifted version of 1. multirecUnlifted version of 4.#multirecRepresents constructors.%multirec5Represents composition with functors of kind * -> *.(multirecGIs used to indicate the type that a particular constructor injects to.*multirec;Represents products (sequences of fields of a constructor).,multirec/Represents sums (choices between constructors)./multirec'Represents constructors without fields.1multirec;Represents constant types that do not belong to the family.4multirecWRepresents recursive positions. The first argument indicates which type to recurse on.7multirecDestructor for '(:>:)'.8multirecDestructor for #.9multirec+For backwards-compatibility: a synonym for .2  !"#$%&'()*+,.-/0123456789%456123/0,.-*+()7%&'#$8 !"9(6*7+7,5#(c) 2009--2010 Universiteit UtrechtBSD3generics@haskell.org experimental non-portableSafe&'=>?@AHSUVX)=>?@ABCDEFGHIJAB?@=>CDEFGHIJ#(c) 2008--2010 Universiteit UtrechtBSD3generics@haskell.org experimental non-portableSafe &'=?@ASUVX2^multirec The function ^ takes a functor fP. All the recursive instances in that functor are wrapped by an application of r. The argument to ^# takes a function that transformes r occurrences into r' occurrences, for every ix". In order to associate the index ix with the correct family phi, the argument to hmap5 is additionally parameterized by a witness of type phi ix. _multirecMonadic version of ^.\]^_\]^_#(c) 2009--2010 Universiteit UtrechtBSD3generics@haskell.org experimental non-portableSafe &'>HRSUVX4hijklmnopqrstuvwxyz{|}~utsrvwqponxymlkjz{ih|}~h |5#(c) 2008--2010 Universiteit UtrechtBSD3generics@haskell.org experimental non-portableSafe &'=>?@ASUVX;multirecThe list in the result type allows us to get at the fields of a constructor individually, which in turn allows us to insert additional stuff in between if record notation is used.multirec?For constant types, we make use of the standard show function.  #(c) 2009--2010 Universiteit UtrechtBSD3generics@haskell.org experimental non-portableSafe&'=>?HRSUVXPm multirec?The class fold explains how to convert a convenient algebra [ back into a function from functor to result, as required by the standard fold function.multirecThe algebras passed to the fold have to work for all index types in the family. The additional witness argument is required only to make GHC's typechecker happy.multirec;The type family we use to describe the convenient algebras.multirecFold with convenient algebras.multirecFor constructing algebras that are made of nested pairs rather than n-ary tuples, it is helpful to use this pairing combinator.multirecConstructors are ignored.multirecTags are ignored.multirecqFor a product where the left hand side is an identity, we take the recursive result as an additional argument.multireceFor a product where the left hand side is a constant, we take the value as an additional argument.multirec1For a sum, the algebra is a pair of two algebras.multireceFor an identity, we turn the recursive result into a final result. Note that the index can change.multirec'For a unit, no arguments are available.multirec7For a constant, we take the constant value to a result.5 #(c) 2009--2010 Universiteit UtrechtBSD3generics@haskell.org experimental non-portableSafe&'=>?HRSUVXc multirec?The class fold explains how to convert a convenient algebra [ back into a function from functor to result, as required by the standard fold function.multirecThe algebras passed to the fold have to work for all index types in the family. The additional witness argument is required only to make GHC's typechecker happy.multirec;The type family we use to describe the convenient algebras.multirecFold with convenient algebras.multirecFor constructing algebras that are made of nested pairs rather than n-ary tuples, it is helpful to use this pairing combinator.multirecConstructors are ignored.multirec,A tag changes the index of the final result.multirec1For a sum, the algebra is a pair of two algebras.multireceFor an identity, we turn the recursive result into a final result. Note that the index can change.multirec'For a unit, no arguments are available.multirec7For a constant, we take the constant value to a result.multireceFor a product where the left hand side is a constant, we take the value as an additional argument.5 #(c) 2008--2010 Universiteit UtrechtBSD3generics@haskell.org experimental non-portableSafe &'>HRSUVXe 5 #(c) 2008--2010 Universiteit UtrechtBSD3generics@haskell.org experimental non-portableSafe>HVhB #(c) 2008--2010 Universiteit UtrechtBSD3generics@haskell.org experimental non-portableSafe &'=>?@ASUVXkmultirecCFor constant types, we make use of the standard equality function. #(c) 2008--2010 Universiteit UtrechtBSD3generics@haskell.org experimental non-portableSafe>HSUVXmn#(c) 2008--2010 Universiteit UtrechtBSD3generics@haskell.org experimental non-portableSafe>SXpmultirecNormal version.multirecMonadic version of .multirecApplicative version of .(c) 2008 Universiteit UtrechtBSD3generics@haskell.org experimental non-portableSafer(c  !"#$%&'()*+,.-/0123456789\]^_#(c) 2008--2010 Universiteit UtrechtBSD3generics@haskell.org experimental non-portableNone&'Hmultirec;Given the name of the family index GADT, derive everything.multirecIGiven a list of datatype names, derive datatypes and instances of class . Not needed if  is used.multirecCompatibility. Use  instead.Given the name of the index GADT, the names of the types in the family, and the name (as string) for the pattern functor to derive, generate the Ix and  instances.  IMPORTANTg: It is assumed that the constructors of the GADT have the same names as the datatypes in the family.multirecCompatibility. Use  instead.multirecDerive only the  instance. Not needed if  is used.multirecDerive only the  instances. Not needed if  is used.multirecDerive only the  instance. Not needed if  is used.multirecDerive only the  instance. Not needed if  is used.multirecProcess the reified info of the index GADT, and extract its constructor names, which are also the names of the datatypes that are part of the family.multirecMProcess the reified info of the index GADT, and extract its type parameters.multirecZTurn a record-constructor into a normal constructor by just removing all the field names.multirecTakes the name of a datatype (element of the family). By reifying the datatype, we obtain its constructors. For each constructor, we then generate a constructor-specific datatype, and an instance of the  class.multirec@Given a constructor, create an empty datatype of the same name.multirec/Given a constructor, create an instance of the 9 class for the datatype associated with the constructor.multirecTakes all the names of datatypes belonging to the family, and a particular of these names. Produces the right hand side of the ' type family instance for this family.multirecTakes all the names of datatypes belonging to the family, and a particular name of a constructor of one of the datatypes. Creates the product structure for this constructor.multirecTakes all the names of datatypes belonging to the family, and a particular type (that occurs as a field in one of these datatypes). Produces the structure for this type. We have to distinguish between recursive calls, compositions, and constants.TODO: We currently treat all applications as compositions. However, we can argue that applications should be treated as compositions only if the entire construct cannot be treated as a constant.  !"#$%&'()*+,-../0012234567889:;<<==>??@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~~  ~   r s t u v w x y z { | } ~              %multirec-0.7.9-1Fapm0pUS1fLw063A8mCs7Generics.MultiRec.ConstructorGenerics.MultiRec.TEqGenerics.MultiRec.BaseGenerics.MultiRec.ReadGenerics.MultiRec.HFunctorGenerics.MultiRec.FoldKGenerics.MultiRec.ShowGenerics.MultiRec.FoldAlgKGenerics.MultiRec.FoldAlgGenerics.MultiRec.FoldGenerics.MultiRec.HFixGenerics.MultiRec.EqGenerics.MultiRec.ConNamesGenerics.MultiRec.ComposGenerics.MultiRec.THGenerics.MultiRec AssociativityLeftAssociativeRightAssociativeNotAssociativeFixityPrefixInfix ConstructorconName conFixity$fEqAssociativity$fShowAssociativity$fOrdAssociativity$fReadAssociativity $fEqFixity $fShowFixity $fOrdFixity $fReadFixity:=:ReflcastEqSeqSFamfromtoElproofPFK0unK0I0unI0C:.:DunD:>:Tag:*::+:LRUKunKIunIunTagunCindex$fApplicativeI0 $fFunctorI0 $fFunctorK0Read1read1 HReadPrechreader CountAtoms countatomsreadConsreadPrefixCons readInfixConsreadNoArgsConsappPrecreadPrec readsPrecread$fCountAtoms:*: $fCountAtomsI $fCountAtomsK$fHReadPrecphiC$fHReadPrecphiC0$fHReadPrecphiC1$fHReadPrecphiC2$fHReadPrecphiC3$fHReadPrecphi:>:$fHReadPrecphi:*:$fHReadPrecphi:+:$fHReadPrecphiI$fHReadPrecphiK$fHReadPrecphiU $fRead1Maybe $fRead1[]$fHReadPrecphi:.:HFunctorhmapAhmaphmapM$fHFunctorphiC$fHFunctorphi:.:$fHFunctorphi:>:$fHFunctorphi:*:$fHFunctorphi:+:$fHFunctorphiU$fHFunctorphiK$fHFunctorphiI:->AlgPart ParaAlgebraF ParaAlgebraF' ParaAlgebra ParaAlgebra' CoAlgebraF CoAlgebraF' CoAlgebra CoAlgebra'AlgebraF AlgebraF'AlgebraAlgebra'foldfoldMunfoldunfoldMparaparaM&tagconShow1show1HShow hShowsPrecAlg showsPrecshowspacescommas intersperse $fHShowphiC $fHShowphi:>: $fHShowphi:*: $fHShowphi:+: $fHShowphiU $fHShowphiK $fHShowphiI $fShow1[] $fShow1Maybe $fHShowphi:.:FoldalgAlg$fFoldC $fFold:>: $fFold:*: $fFold:*:0 $fFold:+:$fFoldI$fFoldU$fFoldKComp $fFold:.:HFixHInhouthfromhtoEq1eq1HEqheqeq $fHEqphiC $fHEqphi:>: $fHEqphi:*: $fHEqphi:+: $fHEqphiU $fHEqphiK $fHEqphiI $fHEqphi:.: $fEq1Maybe$fEq1[]ConNames hconNamesconNames $fConNames:>: $fConNamesI $fConNames:.: $fConNames:*: $fConNamesU $fConNamesK $fConNames:+: $fConNamesCcomposcomposMcomposA deriveAllderiveConstructors deriveFamily deriveSystemderivePFderiveEl deriveFam deriveEqS D:R:AlgCr D:R:Alg:>:r D:R:Alg:*:r D:R:Alg:*:r0 D:R:Alg:+:r D:R:AlgIr D:R:AlgUr D:R:AlgKr D:R:AlgCrix D:R:Alg:>:rix D:R:Alg:+:rix D:R:AlgIrix D:R:AlgUrix D:R:AlgKrix D:R:Alg:*:rixextractConstructorNamesextractParametersstripRecordNamesconstrInstancemkData mkInstancepfTypepfConpfField