=F92A      !"#$%&'()*+,-./0123456789:;<=>?@3various operations on n-ary tuples via GHC.Generics(c) 2018 Jiasen Wu !BSD-style (see the file LICENSE) !Jiasen Wu <jiasenwu@hotmail.com>  experimental  portable None-;<=>?FSTV1representation of a tuple of arity > 2, in which u is of the form _ :*: _5utility type function to extract the meta information$utility type function to trim the D1$utility type function to trim the S1'utility type function to trim the Rec0 5 converts a linear product back into a balanced tree. (drop the first n elements from a product (take the first n elements from a productcalculate the half9Representation of tuple are shaped in a balanced tree. ; transforms the tree into a list, for further manipulation. prove that  (a ++ b)  & x == a  & x ++ b  & xutility function to call calculate the halfcase 2. a is _ :< _inductive proof on a case 1. a is []1inductive case. preppend a product with what ever#inductive case. take (n+1) elements$base case. take one out of singleton #inductive case. drop (n+1) elements! base case. drop one from product"inductive case. product#base case. singleton$base case. sinleton  %$  ! #"   3various operations on n-ary tuples via GHC.Generics(c) 2018 Jiasen Wu !BSD-style (see the file LICENSE) !Jiasen Wu <jiasenwu@hotmail.com>  experimental  portable None+-;<=>?FSTV&%A constraint on any 'able data type, where a and b are the input, and c is the output.&calculate the result type of 'AScalculate the tuple constructor of the size 1 bigger upto the tupel of arity of 15B4Type function to calculate the type of cons'ed valueC4Abstract type class for generic representation of a cons able datatypeDconsR takes a value of type va and a value of type vb together vb:'s representation, returns the cons'ed value. Note that, C is inductively scrutinize vb's representation, however this representation is only a dummy argument, since the result is constructed from the value directly.''7 takes two datatype, and produces a tuple of them. if b is unit, then a is returned. if b is not a tuple, then a pair of (a,b) is returned. otherwise, a is placed in front of b.%&''&%CD3various operations on n-ary tuples via GHC.Generics(c) 2018 Jiasen Wu !BSD-style (see the file LICENSE) !Jiasen Wu <jiasenwu@hotmail.com>  experimental  portable None +-;<=FST5 ,A constraint on any .able data type, where a is the input type, and (b,c) is the output type-calculate the result type of .ETcalculate the tuple constructor of the size 1 smaller upto the tupel of arity of 16F4Abstract type class for generic representation of a uncons able datatypeGG; is a type function that drops the first element of a tupleHH; is a type function that takes the first element of a tuple..\ takes primitive, pair, tuple, and produces a pair of its first data and the rest elements./tuple of arity > 2 H is the first element G is the rest all elements0pair H is the first element G is the second element1sum datatype H is the datatype itself G is ()2primitive datatype H is the datatype itself G is (),-..-,FI3various operations on n-ary tuples via GHC.Generics(c) 2018 Jiasen Wu !BSD-style (see the file LICENSE) !Jiasen Wu <jiasenwu@hotmail.com>  experimental  portable None -06;=FST9%&',-.J      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN(tuple-ops-0.0.0.2-Aq0p3vQqTGo3saOPqzpbJHData.Tuple.Ops.InternalData.Tuple.Ops.ConsData.Tuple.Ops.UnconsData.Tuple.Ops RepOfTupleMetaOfD1UnD1UnS1UnRec0MetaS NormalizeN normalizeDropDdrop'TakeTtake'Half LinearizeL linearizeAppDistributive appDistrWitTupleRunTupleRappDistrWitPassArglength'half$fAppDistributive:$fAppDistributive[]$fLinearize:*:$fTakeS: $fTakeZxs$fDropS: $fDropZas $fNormalize: $fNormalize:0 $fLinearizeM1ConsableConscons$fConsableRvaM1$fConsableRva:+:$fConsableRvaM10$fConsableRaM1 UnconsableUnconsuncons$fUnconsableRM1$fUnconsableRM10$fUnconsableR:+:$fUnconsableRM11$fGeneric(,,,,,,,,,,,,,,,)$fGeneric(,,,,,,,,,,,,,,)$fGeneric(,,,,,,,,,,,,,)$fGeneric(,,,,,,,,,,,,)$fGeneric(,,,,,,,,,,,)$fGeneric(,,,,,,,,,,)$fGeneric(,,,,,,,,,)$fGeneric(,,,,,,,,)$fGeneric(,,,,,,,)$fGenericDouble$fGenericFloat $fGenericChar $fGenericWord $fGenericInt TupleConSuccConsR ConsableRconsR TupleConPred UnconsableRTailRHeadRunconsR