úÎ/B+¬:      !"#$%&'()*+,-./01234567893various 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 Safe-;<=>?FSTVR$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 product %transform the GHC's typelit into SNatRPositive natural number in type level We rely on the SNat to define Take and Dropcalculate the halfOcalculate the number of fields of a product note: undefined on non-product rep9Representation of tuple are shaped in a balanced tree. ; transforms the tree into a line, for further manipulation.4a sentinial datatype that represents a empty product+calculate the number of fields of a productcalculate the half%transform the GHC's typelit into SNat1inductive case. preppend a product with what ever#inductive case. take (n+1) elements&base case 2. take one out of a product#inductive case. drop (n+1) elements"base case 1. drop one from product base case 1. singleton!&base case 1. take one out of singleton"'base case 3. cons field1 with a product#%base case 2. cons field1 with field2 $ base case 1. cons field with end%inductive case. product  &$#"  !  %  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 Safe -;=FST(v &calculate the result type of ':Tcalculate 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 Safe -06;=FST+ž&'A      !"#$%&'()*+,-./0123456789:;<=>?@ABCD(tuple-ops-0.0.0.0-1jJML97V69CGWVNLeyy22PData.Tuple.Ops.InternalData.Tuple.Ops.UnconsData.Tuple.OpsUnD1UnS1UnRec0MetaS NormalizeN normalizeDropDdropTakeTtakeToSNatSNatOneSuccHalfLength LinearizeL linearizeEndlengthhalftosnat$fLinearize:*:b $fTakeSucc:*: $fTakeOne:*: $fDropSucc:*: $fDropOne:*: $fNormalizeM1 $fTakeOneM1$fLinearizeM1:*:$fLinearizeM1M1$fLinearizeM1End$fNormalize:*:Unconsuncons $fUnconsRM1 $fUnconsRM10 $fUnconsR:+: $fUnconsRM11$fGeneric(,,,,,,,,,,,,,,,)$fGeneric(,,,,,,,,,,,,,,)$fGeneric(,,,,,,,,,,,,,)$fGeneric(,,,,,,,,,,,,)$fGeneric(,,,,,,,,,,,)$fGeneric(,,,,,,,,,,)$fGeneric(,,,,,,,,,)$fGeneric(,,,,,,,,)$fGeneric(,,,,,,,)$fGenericDouble$fGenericFloat $fGenericChar $fGenericWord $fGenericInt TupleConPredUnconsRTailRHeadR RepOfTuple RepOfPairunconsR