úÎ,^(Ö9      !"#$%&'()*+,-./0123456783various 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á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 +-;<=FST%œ $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 &9Tcalculate the tuple constructor of the size 1 smaller upto the tupel of arity of 16:4Abstract type class for generic representation of a uncons able datatype;;; is a type function that drops the first element of a tuple<<; is a type function that takes the first element of a tuple=1representation of a tuple of arity > 2, in which u is of the form _ :*: _>representation of a pair&&\ takes primitive, pair, tuple, and produces a pair of its first data and the rest elements.'tuple of arity > 2 < is the first element ; is the rest all elements(pair < is the first element ; is the second element)sum datatype < is the datatype itself ; is ()*primitive datatype < is the datatype itself ; is ()$%&&%$:?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 -06;=FST(Ä$%&@      !"#$%&'()*+,-./0123456789:;<=>?@ABC(tuple-ops-0.0.0.1-I7lU8YHCmUh8GjBK8KkehhData.Tuple.Ops.InternalData.Tuple.Ops.UnconsData.Tuple.OpsMetaOfD1UnD1UnS1UnRec0MetaS NormalizeN normalizeDropDdrop'TakeTtake'Half LinearizeL linearizeAppDistributive appDistrWitTupleRunTupleRappDistrWitPassArglength'half$fAppDistributive:$fAppDistributive[]$fLinearize:*:$fTakeS: $fTakeZxs$fDropS: $fDropZas $fNormalize: $fNormalize:0 $fLinearizeM1 UnconsableUnconsuncons $fUnconsRM1 $fUnconsRM10 $fUnconsR:+: $fUnconsRM11$fGeneric(,,,,,,,,,,,,,,,)$fGeneric(,,,,,,,,,,,,,,)$fGeneric(,,,,,,,,,,,,,)$fGeneric(,,,,,,,,,,,,)$fGeneric(,,,,,,,,,,,)$fGeneric(,,,,,,,,,,)$fGeneric(,,,,,,,,,)$fGeneric(,,,,,,,,)$fGeneric(,,,,,,,)$fGenericDouble$fGenericFloat $fGenericChar $fGenericWord $fGenericInt TupleConPredUnconsRTailRHeadR RepOfTuple RepOfPairunconsR