    {-# OPTIONS_GHC -Wall -fno-warn-orphans #-}
    ----------------------------------------------------------------------
    -- |
    -- Module      :  Data.NumInstances.Tuple
    -- Copyright   :  (c) Conal Elliott 2008-2013
    -- License     :  BSD3
    --
    -- Maintainer  :  conal@conal.net
    -- Stability   :  experimental
    --
    -- Number class instances for tuples
    ----------------------------------------------------------------------

    module Data.NumInstances.Tuple () where

    -- TODO: Replace with a Template Haskell definition and applications

    lift2 :: (a->u) -> (b->v) -> (a,b) -> (u,v)
    lift2 :: (a -> u) -> (b -> v) -> (a, b) -> (u, v)
    lift2 fa :: a -> u
    fa fb :: b -> v
    fb (a :: a
    a,b :: b
    b) = (a -> u
    fa a
    a, b -> v
    fb b
    b)

    -- Equivalently, lift2 = (***)

    instance (Num a, Num b) => Num (a,b) where
      fromInteger :: Integer -> (a, b)
    fromInteger n :: Integer
    n   = (Integer -> a
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> b
    forall a. Num a => Integer -> a
    fromInteger Integer
    n)
      (a :: a
    a,b :: b
    b) + :: (a, b) -> (a, b) -> (a, b)
    + (a' :: a
    a',b' :: b
    b') = (a
    aa -> a -> a
    forall a. Num a => a -> a -> a
    +a
    a',b
    bb -> b -> b
    forall a. Num a => a -> a -> a
    +b
    b')
      (a :: a
    a,b :: b
    b) - :: (a, b) -> (a, b) -> (a, b)
    - (a' :: a
    a',b' :: b
    b') = (a
    aa -> a -> a
    forall a. Num a => a -> a -> a
    -a
    a',b
    bb -> b -> b
    forall a. Num a => a -> a -> a
    -b
    b')
      (a :: a
    a,b :: b
    b) * :: (a, b) -> (a, b) -> (a, b)
    * (a' :: a
    a',b' :: b
    b') = (a
    aa -> a -> a
    forall a. Num a => a -> a -> a
    *a
    a',b
    bb -> b -> b
    forall a. Num a => a -> a -> a
    *b
    b')
      negate :: (a, b) -> (a, b)
    negate = (a -> a) -> (b -> b) -> (a, b) -> (a, b)
    forall a u b v. (a -> u) -> (b -> v) -> (a, b) -> (u, v)
    lift2 a -> a
    forall a. Num a => a -> a
    negate b -> b
    forall a. Num a => a -> a
    negate
      abs :: (a, b) -> (a, b)
    abs    = (a -> a) -> (b -> b) -> (a, b) -> (a, b)
    forall a u b v. (a -> u) -> (b -> v) -> (a, b) -> (u, v)
    lift2 a -> a
    forall a. Num a => a -> a
    abs b -> b
    forall a. Num a => a -> a
    abs
      signum :: (a, b) -> (a, b)
    signum = (a -> a) -> (b -> b) -> (a, b) -> (a, b)
    forall a u b v. (a -> u) -> (b -> v) -> (a, b) -> (u, v)
    lift2 a -> a
    forall a. Num a => a -> a
    signum b -> b
    forall a. Num a => a -> a
    signum

    instance (Fractional a, Fractional b) => Fractional (a,b) where
      fromRational :: Rational -> (a, b)
    fromRational x :: Rational
    x = (Rational -> a
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> b
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x)
      recip :: (a, b) -> (a, b)
    recip = (a -> a) -> (b -> b) -> (a, b) -> (a, b)
    forall a u b v. (a -> u) -> (b -> v) -> (a, b) -> (u, v)
    lift2 a -> a
    forall a. Fractional a => a -> a
    recip b -> b
    forall a. Fractional a => a -> a
    recip

    instance (Floating a, Floating b) => Floating (a,b) where
      pi :: (a, b)
    pi    = (a
    forall a. Floating a => a
    pi,b
    forall a. Floating a => a
    pi)
      exp :: (a, b) -> (a, b)
    exp   = (a -> a) -> (b -> b) -> (a, b) -> (a, b)
    forall a u b v. (a -> u) -> (b -> v) -> (a, b) -> (u, v)
    lift2 a -> a
    forall a. Floating a => a -> a
    exp b -> b
    forall a. Floating a => a -> a
    exp
      log :: (a, b) -> (a, b)
    log   = (a -> a) -> (b -> b) -> (a, b) -> (a, b)
    forall a u b v. (a -> u) -> (b -> v) -> (a, b) -> (u, v)
    lift2 a -> a
    forall a. Floating a => a -> a
    log b -> b
    forall a. Floating a => a -> a
    log
      sqrt :: (a, b) -> (a, b)
    sqrt  = (a -> a) -> (b -> b) -> (a, b) -> (a, b)
    forall a u b v. (a -> u) -> (b -> v) -> (a, b) -> (u, v)
    lift2 a -> a
    forall a. Floating a => a -> a
    sqrt b -> b
    forall a. Floating a => a -> a
    sqrt
      sin :: (a, b) -> (a, b)
    sin   = (a -> a) -> (b -> b) -> (a, b) -> (a, b)
    forall a u b v. (a -> u) -> (b -> v) -> (a, b) -> (u, v)
    lift2 a -> a
    forall a. Floating a => a -> a
    sin b -> b
    forall a. Floating a => a -> a
    sin
      cos :: (a, b) -> (a, b)
    cos   = (a -> a) -> (b -> b) -> (a, b) -> (a, b)
    forall a u b v. (a -> u) -> (b -> v) -> (a, b) -> (u, v)
    lift2 a -> a
    forall a. Floating a => a -> a
    cos b -> b
    forall a. Floating a => a -> a
    cos
      sinh :: (a, b) -> (a, b)
    sinh  = (a -> a) -> (b -> b) -> (a, b) -> (a, b)
    forall a u b v. (a -> u) -> (b -> v) -> (a, b) -> (u, v)
    lift2 a -> a
    forall a. Floating a => a -> a
    sinh b -> b
    forall a. Floating a => a -> a
    sinh
      cosh :: (a, b) -> (a, b)
    cosh  = (a -> a) -> (b -> b) -> (a, b) -> (a, b)
    forall a u b v. (a -> u) -> (b -> v) -> (a, b) -> (u, v)
    lift2 a -> a
    forall a. Floating a => a -> a
    cosh b -> b
    forall a. Floating a => a -> a
    cosh
      asin :: (a, b) -> (a, b)
    asin  = (a -> a) -> (b -> b) -> (a, b) -> (a, b)
    forall a u b v. (a -> u) -> (b -> v) -> (a, b) -> (u, v)
    lift2 a -> a
    forall a. Floating a => a -> a
    asin b -> b
    forall a. Floating a => a -> a
    asin
      acos :: (a, b) -> (a, b)
    acos  = (a -> a) -> (b -> b) -> (a, b) -> (a, b)
    forall a u b v. (a -> u) -> (b -> v) -> (a, b) -> (u, v)
    lift2 a -> a
    forall a. Floating a => a -> a
    acos b -> b
    forall a. Floating a => a -> a
    acos
      atan :: (a, b) -> (a, b)
    atan  = (a -> a) -> (b -> b) -> (a, b) -> (a, b)
    forall a u b v. (a -> u) -> (b -> v) -> (a, b) -> (u, v)
    lift2 a -> a
    forall a. Floating a => a -> a
    atan b -> b
    forall a. Floating a => a -> a
    atan
      asinh :: (a, b) -> (a, b)
    asinh = (a -> a) -> (b -> b) -> (a, b) -> (a, b)
    forall a u b v. (a -> u) -> (b -> v) -> (a, b) -> (u, v)
    lift2 a -> a
    forall a. Floating a => a -> a
    asinh b -> b
    forall a. Floating a => a -> a
    asinh
      acosh :: (a, b) -> (a, b)
    acosh = (a -> a) -> (b -> b) -> (a, b) -> (a, b)
    forall a u b v. (a -> u) -> (b -> v) -> (a, b) -> (u, v)
    lift2 a -> a
    forall a. Floating a => a -> a
    acosh b -> b
    forall a. Floating a => a -> a
    acosh
      atanh :: (a, b) -> (a, b)
    atanh = (a -> a) -> (b -> b) -> (a, b) -> (a, b)
    forall a u b v. (a -> u) -> (b -> v) -> (a, b) -> (u, v)
    lift2 a -> a
    forall a. Floating a => a -> a
    atanh b -> b
    forall a. Floating a => a -> a
    atanh

    instance (Num a, Num b, Num c) => Num (a,b,c) where
      fromInteger :: Integer -> (a, b, c)
    fromInteger n :: Integer
    n = (Integer -> a
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> b
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> c
    forall a. Num a => Integer -> a
    fromInteger Integer
    n)
      (a :: a
    a,b :: b
    b,c :: c
    c) + :: (a, b, c) -> (a, b, c) -> (a, b, c)
    + (a' :: a
    a',b' :: b
    b',c' :: c
    c') = (a
    aa -> a -> a
    forall a. Num a => a -> a -> a
    +a
    a',b
    bb -> b -> b
    forall a. Num a => a -> a -> a
    +b
    b',c
    cc -> c -> c
    forall a. Num a => a -> a -> a
    +c
    c')
      (a :: a
    a,b :: b
    b,c :: c
    c) - :: (a, b, c) -> (a, b, c) -> (a, b, c)
    - (a' :: a
    a',b' :: b
    b',c' :: c
    c') = (a
    aa -> a -> a
    forall a. Num a => a -> a -> a
    -a
    a',b
    bb -> b -> b
    forall a. Num a => a -> a -> a
    -b
    b',c
    cc -> c -> c
    forall a. Num a => a -> a -> a
    -c
    c')
      (a :: a
    a,b :: b
    b,c :: c
    c) * :: (a, b, c) -> (a, b, c) -> (a, b, c)
    * (a' :: a
    a',b' :: b
    b',c' :: c
    c') = (a
    aa -> a -> a
    forall a. Num a => a -> a -> a
    *a
    a',b
    bb -> b -> b
    forall a. Num a => a -> a -> a
    *b
    b',c
    cc -> c -> c
    forall a. Num a => a -> a -> a
    *c
    c')
      negate :: (a, b, c) -> (a, b, c)
    negate = (a -> a) -> (b -> b) -> (c -> c) -> (a, b, c) -> (a, b, c)
    forall a u b v c w.
    (a -> u) -> (b -> v) -> (c -> w) -> (a, b, c) -> (u, v, w)
    lift3 a -> a
    forall a. Num a => a -> a
    negate b -> b
    forall a. Num a => a -> a
    negate c -> c
    forall a. Num a => a -> a
    negate
      abs :: (a, b, c) -> (a, b, c)
    abs    = (a -> a) -> (b -> b) -> (c -> c) -> (a, b, c) -> (a, b, c)
    forall a u b v c w.
    (a -> u) -> (b -> v) -> (c -> w) -> (a, b, c) -> (u, v, w)
    lift3 a -> a
    forall a. Num a => a -> a
    abs b -> b
    forall a. Num a => a -> a
    abs c -> c
    forall a. Num a => a -> a
    abs
      signum :: (a, b, c) -> (a, b, c)
    signum = (a -> a) -> (b -> b) -> (c -> c) -> (a, b, c) -> (a, b, c)
    forall a u b v c w.
    (a -> u) -> (b -> v) -> (c -> w) -> (a, b, c) -> (u, v, w)
    lift3 a -> a
    forall a. Num a => a -> a
    signum b -> b
    forall a. Num a => a -> a
    signum c -> c
    forall a. Num a => a -> a
    signum

    instance (Fractional a, Fractional b, Fractional c)
        => Fractional (a,b,c) where
      fromRational :: Rational -> (a, b, c)
    fromRational x :: Rational
    x = (Rational -> a
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> b
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> c
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x)
      recip :: (a, b, c) -> (a, b, c)
    recip = (a -> a) -> (b -> b) -> (c -> c) -> (a, b, c) -> (a, b, c)
    forall a u b v c w.
    (a -> u) -> (b -> v) -> (c -> w) -> (a, b, c) -> (u, v, w)
    lift3 a -> a
    forall a. Fractional a => a -> a
    recip b -> b
    forall a. Fractional a => a -> a
    recip c -> c
    forall a. Fractional a => a -> a
    recip

    lift3 :: (a->u) -> (b->v) -> (c->w)
          -> (a,b,c) -> (u,v,w)
    lift3 :: (a -> u) -> (b -> v) -> (c -> w) -> (a, b, c) -> (u, v, w)
    lift3 fa :: a -> u
    fa fb :: b -> v
    fb fc :: c -> w
    fc (a :: a
    a,b :: b
    b,c :: c
    c) = (a -> u
    fa a
    a, b -> v
    fb b
    b, c -> w
    fc c
    c)

    instance (Floating a, Floating b, Floating c)
        => Floating (a,b,c) where
      pi :: (a, b, c)
    pi    = (a
    forall a. Floating a => a
    pi,b
    forall a. Floating a => a
    pi,c
    forall a. Floating a => a
    pi)
      exp :: (a, b, c) -> (a, b, c)
    exp   = (a -> a) -> (b -> b) -> (c -> c) -> (a, b, c) -> (a, b, c)
    forall a u b v c w.
    (a -> u) -> (b -> v) -> (c -> w) -> (a, b, c) -> (u, v, w)
    lift3 a -> a
    forall a. Floating a => a -> a
    exp b -> b
    forall a. Floating a => a -> a
    exp c -> c
    forall a. Floating a => a -> a
    exp
      log :: (a, b, c) -> (a, b, c)
    log   = (a -> a) -> (b -> b) -> (c -> c) -> (a, b, c) -> (a, b, c)
    forall a u b v c w.
    (a -> u) -> (b -> v) -> (c -> w) -> (a, b, c) -> (u, v, w)
    lift3 a -> a
    forall a. Floating a => a -> a
    log b -> b
    forall a. Floating a => a -> a
    log c -> c
    forall a. Floating a => a -> a
    log
      sqrt :: (a, b, c) -> (a, b, c)
    sqrt  = (a -> a) -> (b -> b) -> (c -> c) -> (a, b, c) -> (a, b, c)
    forall a u b v c w.
    (a -> u) -> (b -> v) -> (c -> w) -> (a, b, c) -> (u, v, w)
    lift3 a -> a
    forall a. Floating a => a -> a
    sqrt b -> b
    forall a. Floating a => a -> a
    sqrt c -> c
    forall a. Floating a => a -> a
    sqrt
      sin :: (a, b, c) -> (a, b, c)
    sin   = (a -> a) -> (b -> b) -> (c -> c) -> (a, b, c) -> (a, b, c)
    forall a u b v c w.
    (a -> u) -> (b -> v) -> (c -> w) -> (a, b, c) -> (u, v, w)
    lift3 a -> a
    forall a. Floating a => a -> a
    sin b -> b
    forall a. Floating a => a -> a
    sin c -> c
    forall a. Floating a => a -> a
    sin
      cos :: (a, b, c) -> (a, b, c)
    cos   = (a -> a) -> (b -> b) -> (c -> c) -> (a, b, c) -> (a, b, c)
    forall a u b v c w.
    (a -> u) -> (b -> v) -> (c -> w) -> (a, b, c) -> (u, v, w)
    lift3 a -> a
    forall a. Floating a => a -> a
    cos b -> b
    forall a. Floating a => a -> a
    cos c -> c
    forall a. Floating a => a -> a
    cos
      sinh :: (a, b, c) -> (a, b, c)
    sinh  = (a -> a) -> (b -> b) -> (c -> c) -> (a, b, c) -> (a, b, c)
    forall a u b v c w.
    (a -> u) -> (b -> v) -> (c -> w) -> (a, b, c) -> (u, v, w)
    lift3 a -> a
    forall a. Floating a => a -> a
    sinh b -> b
    forall a. Floating a => a -> a
    sinh c -> c
    forall a. Floating a => a -> a
    sinh
      cosh :: (a, b, c) -> (a, b, c)
    cosh  = (a -> a) -> (b -> b) -> (c -> c) -> (a, b, c) -> (a, b, c)
    forall a u b v c w.
    (a -> u) -> (b -> v) -> (c -> w) -> (a, b, c) -> (u, v, w)
    lift3 a -> a
    forall a. Floating a => a -> a
    cosh b -> b
    forall a. Floating a => a -> a
    cosh c -> c
    forall a. Floating a => a -> a
    cosh
      asin :: (a, b, c) -> (a, b, c)
    asin  = (a -> a) -> (b -> b) -> (c -> c) -> (a, b, c) -> (a, b, c)
    forall a u b v c w.
    (a -> u) -> (b -> v) -> (c -> w) -> (a, b, c) -> (u, v, w)
    lift3 a -> a
    forall a. Floating a => a -> a
    asin b -> b
    forall a. Floating a => a -> a
    asin c -> c
    forall a. Floating a => a -> a
    asin
      acos :: (a, b, c) -> (a, b, c)
    acos  = (a -> a) -> (b -> b) -> (c -> c) -> (a, b, c) -> (a, b, c)
    forall a u b v c w.
    (a -> u) -> (b -> v) -> (c -> w) -> (a, b, c) -> (u, v, w)
    lift3 a -> a
    forall a. Floating a => a -> a
    acos b -> b
    forall a. Floating a => a -> a
    acos c -> c
    forall a. Floating a => a -> a
    acos
      atan :: (a, b, c) -> (a, b, c)
    atan  = (a -> a) -> (b -> b) -> (c -> c) -> (a, b, c) -> (a, b, c)
    forall a u b v c w.
    (a -> u) -> (b -> v) -> (c -> w) -> (a, b, c) -> (u, v, w)
    lift3 a -> a
    forall a. Floating a => a -> a
    atan b -> b
    forall a. Floating a => a -> a
    atan c -> c
    forall a. Floating a => a -> a
    atan
      asinh :: (a, b, c) -> (a, b, c)
    asinh = (a -> a) -> (b -> b) -> (c -> c) -> (a, b, c) -> (a, b, c)
    forall a u b v c w.
    (a -> u) -> (b -> v) -> (c -> w) -> (a, b, c) -> (u, v, w)
    lift3 a -> a
    forall a. Floating a => a -> a
    asinh b -> b
    forall a. Floating a => a -> a
    asinh c -> c
    forall a. Floating a => a -> a
    asinh
      acosh :: (a, b, c) -> (a, b, c)
    acosh = (a -> a) -> (b -> b) -> (c -> c) -> (a, b, c) -> (a, b, c)
    forall a u b v c w.
    (a -> u) -> (b -> v) -> (c -> w) -> (a, b, c) -> (u, v, w)
    lift3 a -> a
    forall a. Floating a => a -> a
    acosh b -> b
    forall a. Floating a => a -> a
    acosh c -> c
    forall a. Floating a => a -> a
    acosh
      atanh :: (a, b, c) -> (a, b, c)
    atanh = (a -> a) -> (b -> b) -> (c -> c) -> (a, b, c) -> (a, b, c)
    forall a u b v c w.
    (a -> u) -> (b -> v) -> (c -> w) -> (a, b, c) -> (u, v, w)
    lift3 a -> a
    forall a. Floating a => a -> a
    atanh b -> b
    forall a. Floating a => a -> a
    atanh c -> c
    forall a. Floating a => a -> a
    atanh

    lift4 :: (a->u) -> (b->v) -> (c->w) -> (d->x)
          -> (a,b,c,d) -> (u,v,w,x)
    lift4 :: (a -> u)
    -> (b -> v) -> (c -> w) -> (d -> x) -> (a, b, c, d) -> (u, v, w, x)
    lift4 fa :: a -> u
    fa fb :: b -> v
    fb fc :: c -> w
    fc fd :: d -> x
    fd (a :: a
    a,b :: b
    b,c :: c
    c,d :: d
    d) = (a -> u
    fa a
    a, b -> v
    fb b
    b, c -> w
    fc c
    c, d -> x
    fd d
    d)

    instance (Num a, Num b, Num c, Num d) => Num (a,b,c,d) where
      fromInteger :: Integer -> (a, b, c, d)
    fromInteger n :: Integer
    n = (Integer -> a
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> b
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> c
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> d
    forall a. Num a => Integer -> a
    fromInteger Integer
    n)
      (a :: a
    a,b :: b
    b,c :: c
    c,d :: d
    d) + :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d)
    + (a' :: a
    a',b' :: b
    b',c' :: c
    c',d' :: d
    d') = (a
    aa -> a -> a
    forall a. Num a => a -> a -> a
    +a
    a',b
    bb -> b -> b
    forall a. Num a => a -> a -> a
    +b
    b',c
    cc -> c -> c
    forall a. Num a => a -> a -> a
    +c
    c',d
    dd -> d -> d
    forall a. Num a => a -> a -> a
    +d
    d')
      (a :: a
    a,b :: b
    b,c :: c
    c,d :: d
    d) - :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d)
    - (a' :: a
    a',b' :: b
    b',c' :: c
    c',d' :: d
    d') = (a
    aa -> a -> a
    forall a. Num a => a -> a -> a
    -a
    a',b
    bb -> b -> b
    forall a. Num a => a -> a -> a
    -b
    b',c
    cc -> c -> c
    forall a. Num a => a -> a -> a
    -c
    c',d
    dd -> d -> d
    forall a. Num a => a -> a -> a
    -d
    d')
      (a :: a
    a,b :: b
    b,c :: c
    c,d :: d
    d) * :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d)
    * (a' :: a
    a',b' :: b
    b',c' :: c
    c',d' :: d
    d') = (a
    aa -> a -> a
    forall a. Num a => a -> a -> a
    *a
    a',b
    bb -> b -> b
    forall a. Num a => a -> a -> a
    *b
    b',c
    cc -> c -> c
    forall a. Num a => a -> a -> a
    *c
    c',d
    dd -> d -> d
    forall a. Num a => a -> a -> a
    *d
    d')
      negate :: (a, b, c, d) -> (a, b, c, d)
    negate = (a -> a)
    -> (b -> b) -> (c -> c) -> (d -> d) -> (a, b, c, d) -> (a, b, c, d)
    forall a u b v c w d x.
    (a -> u)
    -> (b -> v) -> (c -> w) -> (d -> x) -> (a, b, c, d) -> (u, v, w, x)
    lift4 a -> a
    forall a. Num a => a -> a
    negate b -> b
    forall a. Num a => a -> a
    negate c -> c
    forall a. Num a => a -> a
    negate d -> d
    forall a. Num a => a -> a
    negate
      abs :: (a, b, c, d) -> (a, b, c, d)
    abs    = (a -> a)
    -> (b -> b) -> (c -> c) -> (d -> d) -> (a, b, c, d) -> (a, b, c, d)
    forall a u b v c w d x.
    (a -> u)
    -> (b -> v) -> (c -> w) -> (d -> x) -> (a, b, c, d) -> (u, v, w, x)
    lift4 a -> a
    forall a. Num a => a -> a
    abs b -> b
    forall a. Num a => a -> a
    abs c -> c
    forall a. Num a => a -> a
    abs d -> d
    forall a. Num a => a -> a
    abs
      signum :: (a, b, c, d) -> (a, b, c, d)
    signum = (a -> a)
    -> (b -> b) -> (c -> c) -> (d -> d) -> (a, b, c, d) -> (a, b, c, d)
    forall a u b v c w d x.
    (a -> u)
    -> (b -> v) -> (c -> w) -> (d -> x) -> (a, b, c, d) -> (u, v, w, x)
    lift4 a -> a
    forall a. Num a => a -> a
    signum b -> b
    forall a. Num a => a -> a
    signum c -> c
    forall a. Num a => a -> a
    signum d -> d
    forall a. Num a => a -> a
    signum

    instance (Fractional a, Fractional b, Fractional c, Fractional d)
        => Fractional (a,b,c,d) where
      fromRational :: Rational -> (a, b, c, d)
    fromRational x :: Rational
    x = (Rational -> a
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> b
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> c
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> d
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x)
      recip :: (a, b, c, d) -> (a, b, c, d)
    recip = (a -> a)
    -> (b -> b) -> (c -> c) -> (d -> d) -> (a, b, c, d) -> (a, b, c, d)
    forall a u b v c w d x.
    (a -> u)
    -> (b -> v) -> (c -> w) -> (d -> x) -> (a, b, c, d) -> (u, v, w, x)
    lift4 a -> a
    forall a. Fractional a => a -> a
    recip b -> b
    forall a. Fractional a => a -> a
    recip c -> c
    forall a. Fractional a => a -> a
    recip d -> d
    forall a. Fractional a => a -> a
    recip

    instance (Floating a, Floating b, Floating c, Floating d)
        => Floating (a,b,c,d) where
      pi :: (a, b, c, d)
    pi    = (a
    forall a. Floating a => a
    pi,b
    forall a. Floating a => a
    pi,c
    forall a. Floating a => a
    pi,d
    forall a. Floating a => a
    pi)
      exp :: (a, b, c, d) -> (a, b, c, d)
    exp   = (a -> a)
    -> (b -> b) -> (c -> c) -> (d -> d) -> (a, b, c, d) -> (a, b, c, d)
    forall a u b v c w d x.
    (a -> u)
    -> (b -> v) -> (c -> w) -> (d -> x) -> (a, b, c, d) -> (u, v, w, x)
    lift4 a -> a
    forall a. Floating a => a -> a
    exp b -> b
    forall a. Floating a => a -> a
    exp c -> c
    forall a. Floating a => a -> a
    exp d -> d
    forall a. Floating a => a -> a
    exp
      log :: (a, b, c, d) -> (a, b, c, d)
    log   = (a -> a)
    -> (b -> b) -> (c -> c) -> (d -> d) -> (a, b, c, d) -> (a, b, c, d)
    forall a u b v c w d x.
    (a -> u)
    -> (b -> v) -> (c -> w) -> (d -> x) -> (a, b, c, d) -> (u, v, w, x)
    lift4 a -> a
    forall a. Floating a => a -> a
    log b -> b
    forall a. Floating a => a -> a
    log c -> c
    forall a. Floating a => a -> a
    log d -> d
    forall a. Floating a => a -> a
    log
      sqrt :: (a, b, c, d) -> (a, b, c, d)
    sqrt  = (a -> a)
    -> (b -> b) -> (c -> c) -> (d -> d) -> (a, b, c, d) -> (a, b, c, d)
    forall a u b v c w d x.
    (a -> u)
    -> (b -> v) -> (c -> w) -> (d -> x) -> (a, b, c, d) -> (u, v, w, x)
    lift4 a -> a
    forall a. Floating a => a -> a
    sqrt b -> b
    forall a. Floating a => a -> a
    sqrt c -> c
    forall a. Floating a => a -> a
    sqrt d -> d
    forall a. Floating a => a -> a
    sqrt
      sin :: (a, b, c, d) -> (a, b, c, d)
    sin   = (a -> a)
    -> (b -> b) -> (c -> c) -> (d -> d) -> (a, b, c, d) -> (a, b, c, d)
    forall a u b v c w d x.
    (a -> u)
    -> (b -> v) -> (c -> w) -> (d -> x) -> (a, b, c, d) -> (u, v, w, x)
    lift4 a -> a
    forall a. Floating a => a -> a
    sin b -> b
    forall a. Floating a => a -> a
    sin c -> c
    forall a. Floating a => a -> a
    sin d -> d
    forall a. Floating a => a -> a
    sin
      cos :: (a, b, c, d) -> (a, b, c, d)
    cos   = (a -> a)
    -> (b -> b) -> (c -> c) -> (d -> d) -> (a, b, c, d) -> (a, b, c, d)
    forall a u b v c w d x.
    (a -> u)
    -> (b -> v) -> (c -> w) -> (d -> x) -> (a, b, c, d) -> (u, v, w, x)
    lift4 a -> a
    forall a. Floating a => a -> a
    cos b -> b
    forall a. Floating a => a -> a
    cos c -> c
    forall a. Floating a => a -> a
    cos d -> d
    forall a. Floating a => a -> a
    cos
      sinh :: (a, b, c, d) -> (a, b, c, d)
    sinh  = (a -> a)
    -> (b -> b) -> (c -> c) -> (d -> d) -> (a, b, c, d) -> (a, b, c, d)
    forall a u b v c w d x.
    (a -> u)
    -> (b -> v) -> (c -> w) -> (d -> x) -> (a, b, c, d) -> (u, v, w, x)
    lift4 a -> a
    forall a. Floating a => a -> a
    sinh b -> b
    forall a. Floating a => a -> a
    sinh c -> c
    forall a. Floating a => a -> a
    sinh d -> d
    forall a. Floating a => a -> a
    sinh
      cosh :: (a, b, c, d) -> (a, b, c, d)
    cosh  = (a -> a)
    -> (b -> b) -> (c -> c) -> (d -> d) -> (a, b, c, d) -> (a, b, c, d)
    forall a u b v c w d x.
    (a -> u)
    -> (b -> v) -> (c -> w) -> (d -> x) -> (a, b, c, d) -> (u, v, w, x)
    lift4 a -> a
    forall a. Floating a => a -> a
    cosh b -> b
    forall a. Floating a => a -> a
    cosh c -> c
    forall a. Floating a => a -> a
    cosh d -> d
    forall a. Floating a => a -> a
    cosh
      asin :: (a, b, c, d) -> (a, b, c, d)
    asin  = (a -> a)
    -> (b -> b) -> (c -> c) -> (d -> d) -> (a, b, c, d) -> (a, b, c, d)
    forall a u b v c w d x.
    (a -> u)
    -> (b -> v) -> (c -> w) -> (d -> x) -> (a, b, c, d) -> (u, v, w, x)
    lift4 a -> a
    forall a. Floating a => a -> a
    asin b -> b
    forall a. Floating a => a -> a
    asin c -> c
    forall a. Floating a => a -> a
    asin d -> d
    forall a. Floating a => a -> a
    asin
      acos :: (a, b, c, d) -> (a, b, c, d)
    acos  = (a -> a)
    -> (b -> b) -> (c -> c) -> (d -> d) -> (a, b, c, d) -> (a, b, c, d)
    forall a u b v c w d x.
    (a -> u)
    -> (b -> v) -> (c -> w) -> (d -> x) -> (a, b, c, d) -> (u, v, w, x)
    lift4 a -> a
    forall a. Floating a => a -> a
    acos b -> b
    forall a. Floating a => a -> a
    acos c -> c
    forall a. Floating a => a -> a
    acos d -> d
    forall a. Floating a => a -> a
    acos
      atan :: (a, b, c, d) -> (a, b, c, d)
    atan  = (a -> a)
    -> (b -> b) -> (c -> c) -> (d -> d) -> (a, b, c, d) -> (a, b, c, d)
    forall a u b v c w d x.
    (a -> u)
    -> (b -> v) -> (c -> w) -> (d -> x) -> (a, b, c, d) -> (u, v, w, x)
    lift4 a -> a
    forall a. Floating a => a -> a
    atan b -> b
    forall a. Floating a => a -> a
    atan c -> c
    forall a. Floating a => a -> a
    atan d -> d
    forall a. Floating a => a -> a
    atan
      asinh :: (a, b, c, d) -> (a, b, c, d)
    asinh = (a -> a)
    -> (b -> b) -> (c -> c) -> (d -> d) -> (a, b, c, d) -> (a, b, c, d)
    forall a u b v c w d x.
    (a -> u)
    -> (b -> v) -> (c -> w) -> (d -> x) -> (a, b, c, d) -> (u, v, w, x)
    lift4 a -> a
    forall a. Floating a => a -> a
    asinh b -> b
    forall a. Floating a => a -> a
    asinh c -> c
    forall a. Floating a => a -> a
    asinh d -> d
    forall a. Floating a => a -> a
    asinh
      acosh :: (a, b, c, d) -> (a, b, c, d)
    acosh = (a -> a)
    -> (b -> b) -> (c -> c) -> (d -> d) -> (a, b, c, d) -> (a, b, c, d)
    forall a u b v c w d x.
    (a -> u)
    -> (b -> v) -> (c -> w) -> (d -> x) -> (a, b, c, d) -> (u, v, w, x)
    lift4 a -> a
    forall a. Floating a => a -> a
    acosh b -> b
    forall a. Floating a => a -> a
    acosh c -> c
    forall a. Floating a => a -> a
    acosh d -> d
    forall a. Floating a => a -> a
    acosh
      atanh :: (a, b, c, d) -> (a, b, c, d)
    atanh = (a -> a)
    -> (b -> b) -> (c -> c) -> (d -> d) -> (a, b, c, d) -> (a, b, c, d)
    forall a u b v c w d x.
    (a -> u)
    -> (b -> v) -> (c -> w) -> (d -> x) -> (a, b, c, d) -> (u, v, w, x)
    lift4 a -> a
    forall a. Floating a => a -> a
    atanh b -> b
    forall a. Floating a => a -> a
    atanh c -> c
    forall a. Floating a => a -> a
    atanh d -> d
    forall a. Floating a => a -> a
    atanh

    lift5 :: (a->u) -> (b->v) -> (c->w) -> (d->x) -> (e->y)
          -> (a,b,c,d,e) -> (u,v,w,x,y)
    lift5 :: (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (a, b, c, d, e)
    -> (u, v, w, x, y)
    lift5 fa :: a -> u
    fa fb :: b -> v
    fb fc :: c -> w
    fc fd :: d -> x
    fd fe :: e -> y
    fe (a :: a
    a,b :: b
    b,c :: c
    c,d :: d
    d,e :: e
    e) =
      (a -> u
    fa a
    a, b -> v
    fb b
    b, c -> w
    fc c
    c, d -> x
    fd d
    d, e -> y
    fe e
    e)

    instance (Num a, Num b, Num c, Num d, Num e) => Num (a,b,c,d,e) where
      fromInteger :: Integer -> (a, b, c, d, e)
    fromInteger n :: Integer
    n = (Integer -> a
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> b
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> c
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> d
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> e
    forall a. Num a => Integer -> a
    fromInteger Integer
    n)
      (a :: a
    a,b :: b
    b,c :: c
    c,d :: d
    d,e :: e
    e) + :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e)
    + (a' :: a
    a',b' :: b
    b',c' :: c
    c',d' :: d
    d',e' :: e
    e') = (a
    aa -> a -> a
    forall a. Num a => a -> a -> a
    +a
    a',b
    bb -> b -> b
    forall a. Num a => a -> a -> a
    +b
    b',c
    cc -> c -> c
    forall a. Num a => a -> a -> a
    +c
    c',d
    dd -> d -> d
    forall a. Num a => a -> a -> a
    +d
    d',e
    ee -> e -> e
    forall a. Num a => a -> a -> a
    +e
    e')
      (a :: a
    a,b :: b
    b,c :: c
    c,d :: d
    d,e :: e
    e) - :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e)
    - (a' :: a
    a',b' :: b
    b',c' :: c
    c',d' :: d
    d',e' :: e
    e') = (a
    aa -> a -> a
    forall a. Num a => a -> a -> a
    -a
    a',b
    bb -> b -> b
    forall a. Num a => a -> a -> a
    -b
    b',c
    cc -> c -> c
    forall a. Num a => a -> a -> a
    -c
    c',d
    dd -> d -> d
    forall a. Num a => a -> a -> a
    -d
    d',e
    ee -> e -> e
    forall a. Num a => a -> a -> a
    -e
    e')
      (a :: a
    a,b :: b
    b,c :: c
    c,d :: d
    d,e :: e
    e) * :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e)
    * (a' :: a
    a',b' :: b
    b',c' :: c
    c',d' :: d
    d',e' :: e
    e') = (a
    aa -> a -> a
    forall a. Num a => a -> a -> a
    *a
    a',b
    bb -> b -> b
    forall a. Num a => a -> a -> a
    *b
    b',c
    cc -> c -> c
    forall a. Num a => a -> a -> a
    *c
    c',d
    dd -> d -> d
    forall a. Num a => a -> a -> a
    *d
    d',e
    ee -> e -> e
    forall a. Num a => a -> a -> a
    *e
    e')
      negate :: (a, b, c, d, e) -> (a, b, c, d, e)
    negate = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (a, b, c, d, e)
    -> (a, b, c, d, e)
    forall a u b v c w d x e y.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (a, b, c, d, e)
    -> (u, v, w, x, y)
    lift5 a -> a
    forall a. Num a => a -> a
    negate b -> b
    forall a. Num a => a -> a
    negate c -> c
    forall a. Num a => a -> a
    negate d -> d
    forall a. Num a => a -> a
    negate e -> e
    forall a. Num a => a -> a
    negate
      abs :: (a, b, c, d, e) -> (a, b, c, d, e)
    abs    = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (a, b, c, d, e)
    -> (a, b, c, d, e)
    forall a u b v c w d x e y.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (a, b, c, d, e)
    -> (u, v, w, x, y)
    lift5 a -> a
    forall a. Num a => a -> a
    abs b -> b
    forall a. Num a => a -> a
    abs c -> c
    forall a. Num a => a -> a
    abs d -> d
    forall a. Num a => a -> a
    abs e -> e
    forall a. Num a => a -> a
    abs
      signum :: (a, b, c, d, e) -> (a, b, c, d, e)
    signum = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (a, b, c, d, e)
    -> (a, b, c, d, e)
    forall a u b v c w d x e y.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (a, b, c, d, e)
    -> (u, v, w, x, y)
    lift5 a -> a
    forall a. Num a => a -> a
    signum b -> b
    forall a. Num a => a -> a
    signum c -> c
    forall a. Num a => a -> a
    signum d -> d
    forall a. Num a => a -> a
    signum e -> e
    forall a. Num a => a -> a
    signum

    instance (Fractional a, Fractional b, Fractional c, Fractional d, Fractional e)
        => Fractional (a,b,c,d,e) where
      fromRational :: Rational -> (a, b, c, d, e)
    fromRational x :: Rational
    x = (Rational -> a
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> b
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> c
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> d
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> e
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x)
      recip :: (a, b, c, d, e) -> (a, b, c, d, e)
    recip = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (a, b, c, d, e)
    -> (a, b, c, d, e)
    forall a u b v c w d x e y.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (a, b, c, d, e)
    -> (u, v, w, x, y)
    lift5 a -> a
    forall a. Fractional a => a -> a
    recip b -> b
    forall a. Fractional a => a -> a
    recip c -> c
    forall a. Fractional a => a -> a
    recip d -> d
    forall a. Fractional a => a -> a
    recip e -> e
    forall a. Fractional a => a -> a
    recip

    instance (Floating a, Floating b, Floating c, Floating d, Floating e)
        => Floating (a,b,c,d,e) where
      pi :: (a, b, c, d, e)
    pi    = (a
    forall a. Floating a => a
    pi,b
    forall a. Floating a => a
    pi,c
    forall a. Floating a => a
    pi,d
    forall a. Floating a => a
    pi,e
    forall a. Floating a => a
    pi)
      exp :: (a, b, c, d, e) -> (a, b, c, d, e)
    exp   = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (a, b, c, d, e)
    -> (a, b, c, d, e)
    forall a u b v c w d x e y.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (a, b, c, d, e)
    -> (u, v, w, x, y)
    lift5 a -> a
    forall a. Floating a => a -> a
    exp b -> b
    forall a. Floating a => a -> a
    exp c -> c
    forall a. Floating a => a -> a
    exp d -> d
    forall a. Floating a => a -> a
    exp e -> e
    forall a. Floating a => a -> a
    exp
      log :: (a, b, c, d, e) -> (a, b, c, d, e)
    log   = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (a, b, c, d, e)
    -> (a, b, c, d, e)
    forall a u b v c w d x e y.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (a, b, c, d, e)
    -> (u, v, w, x, y)
    lift5 a -> a
    forall a. Floating a => a -> a
    log b -> b
    forall a. Floating a => a -> a
    log c -> c
    forall a. Floating a => a -> a
    log d -> d
    forall a. Floating a => a -> a
    log e -> e
    forall a. Floating a => a -> a
    log
      sqrt :: (a, b, c, d, e) -> (a, b, c, d, e)
    sqrt  = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (a, b, c, d, e)
    -> (a, b, c, d, e)
    forall a u b v c w d x e y.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (a, b, c, d, e)
    -> (u, v, w, x, y)
    lift5 a -> a
    forall a. Floating a => a -> a
    sqrt b -> b
    forall a. Floating a => a -> a
    sqrt c -> c
    forall a. Floating a => a -> a
    sqrt d -> d
    forall a. Floating a => a -> a
    sqrt e -> e
    forall a. Floating a => a -> a
    sqrt
      sin :: (a, b, c, d, e) -> (a, b, c, d, e)
    sin   = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (a, b, c, d, e)
    -> (a, b, c, d, e)
    forall a u b v c w d x e y.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (a, b, c, d, e)
    -> (u, v, w, x, y)
    lift5 a -> a
    forall a. Floating a => a -> a
    sin b -> b
    forall a. Floating a => a -> a
    sin c -> c
    forall a. Floating a => a -> a
    sin d -> d
    forall a. Floating a => a -> a
    sin e -> e
    forall a. Floating a => a -> a
    sin
      cos :: (a, b, c, d, e) -> (a, b, c, d, e)
    cos   = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (a, b, c, d, e)
    -> (a, b, c, d, e)
    forall a u b v c w d x e y.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (a, b, c, d, e)
    -> (u, v, w, x, y)
    lift5 a -> a
    forall a. Floating a => a -> a
    cos b -> b
    forall a. Floating a => a -> a
    cos c -> c
    forall a. Floating a => a -> a
    cos d -> d
    forall a. Floating a => a -> a
    cos e -> e
    forall a. Floating a => a -> a
    cos
      sinh :: (a, b, c, d, e) -> (a, b, c, d, e)
    sinh  = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (a, b, c, d, e)
    -> (a, b, c, d, e)
    forall a u b v c w d x e y.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (a, b, c, d, e)
    -> (u, v, w, x, y)
    lift5 a -> a
    forall a. Floating a => a -> a
    sinh b -> b
    forall a. Floating a => a -> a
    sinh c -> c
    forall a. Floating a => a -> a
    sinh d -> d
    forall a. Floating a => a -> a
    sinh e -> e
    forall a. Floating a => a -> a
    sinh
      cosh :: (a, b, c, d, e) -> (a, b, c, d, e)
    cosh  = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (a, b, c, d, e)
    -> (a, b, c, d, e)
    forall a u b v c w d x e y.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (a, b, c, d, e)
    -> (u, v, w, x, y)
    lift5 a -> a
    forall a. Floating a => a -> a
    cosh b -> b
    forall a. Floating a => a -> a
    cosh c -> c
    forall a. Floating a => a -> a
    cosh d -> d
    forall a. Floating a => a -> a
    cosh e -> e
    forall a. Floating a => a -> a
    cosh
      asin :: (a, b, c, d, e) -> (a, b, c, d, e)
    asin  = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (a, b, c, d, e)
    -> (a, b, c, d, e)
    forall a u b v c w d x e y.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (a, b, c, d, e)
    -> (u, v, w, x, y)
    lift5 a -> a
    forall a. Floating a => a -> a
    asin b -> b
    forall a. Floating a => a -> a
    asin c -> c
    forall a. Floating a => a -> a
    asin d -> d
    forall a. Floating a => a -> a
    asin e -> e
    forall a. Floating a => a -> a
    asin
      acos :: (a, b, c, d, e) -> (a, b, c, d, e)
    acos  = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (a, b, c, d, e)
    -> (a, b, c, d, e)
    forall a u b v c w d x e y.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (a, b, c, d, e)
    -> (u, v, w, x, y)
    lift5 a -> a
    forall a. Floating a => a -> a
    acos b -> b
    forall a. Floating a => a -> a
    acos c -> c
    forall a. Floating a => a -> a
    acos d -> d
    forall a. Floating a => a -> a
    acos e -> e
    forall a. Floating a => a -> a
    acos
      atan :: (a, b, c, d, e) -> (a, b, c, d, e)
    atan  = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (a, b, c, d, e)
    -> (a, b, c, d, e)
    forall a u b v c w d x e y.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (a, b, c, d, e)
    -> (u, v, w, x, y)
    lift5 a -> a
    forall a. Floating a => a -> a
    atan b -> b
    forall a. Floating a => a -> a
    atan c -> c
    forall a. Floating a => a -> a
    atan d -> d
    forall a. Floating a => a -> a
    atan e -> e
    forall a. Floating a => a -> a
    atan
      asinh :: (a, b, c, d, e) -> (a, b, c, d, e)
    asinh = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (a, b, c, d, e)
    -> (a, b, c, d, e)
    forall a u b v c w d x e y.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (a, b, c, d, e)
    -> (u, v, w, x, y)
    lift5 a -> a
    forall a. Floating a => a -> a
    asinh b -> b
    forall a. Floating a => a -> a
    asinh c -> c
    forall a. Floating a => a -> a
    asinh d -> d
    forall a. Floating a => a -> a
    asinh e -> e
    forall a. Floating a => a -> a
    asinh
      acosh :: (a, b, c, d, e) -> (a, b, c, d, e)
    acosh = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (a, b, c, d, e)
    -> (a, b, c, d, e)
    forall a u b v c w d x e y.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (a, b, c, d, e)
    -> (u, v, w, x, y)
    lift5 a -> a
    forall a. Floating a => a -> a
    acosh b -> b
    forall a. Floating a => a -> a
    acosh c -> c
    forall a. Floating a => a -> a
    acosh d -> d
    forall a. Floating a => a -> a
    acosh e -> e
    forall a. Floating a => a -> a
    acosh
      atanh :: (a, b, c, d, e) -> (a, b, c, d, e)
    atanh = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (a, b, c, d, e)
    -> (a, b, c, d, e)
    forall a u b v c w d x e y.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (a, b, c, d, e)
    -> (u, v, w, x, y)
    lift5 a -> a
    forall a. Floating a => a -> a
    atanh b -> b
    forall a. Floating a => a -> a
    atanh c -> c
    forall a. Floating a => a -> a
    atanh d -> d
    forall a. Floating a => a -> a
    atanh e -> e
    forall a. Floating a => a -> a
    atanh

    lift6 :: (a->u) -> (b->v) -> (c->w) -> (d->x) -> (e->y) -> (f->t)
          -> (a,b,c,d,e,f) -> (u,v,w,x,y,t)
    lift6 :: (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (a, b, c, d, e, f)
    -> (u, v, w, x, y, t)
    lift6 fa :: a -> u
    fa fb :: b -> v
    fb fc :: c -> w
    fc fd :: d -> x
    fd fe :: e -> y
    fe ff :: f -> t
    ff (a :: a
    a,b :: b
    b,c :: c
    c,d :: d
    d,e :: e
    e,f :: f
    f) =
      (a -> u
    fa a
    a, b -> v
    fb b
    b, c -> w
    fc c
    c, d -> x
    fd d
    d, e -> y
    fe e
    e, f -> t
    ff f
    f)

    instance (Num a, Num b, Num c, Num d, Num e, Num f) => Num (a,b,c,d,e,f) where
      fromInteger :: Integer -> (a, b, c, d, e, f)
    fromInteger n :: Integer
    n = (Integer -> a
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> b
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> c
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> d
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> e
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> f
    forall a. Num a => Integer -> a
    fromInteger Integer
    n)
      (a :: a
    a,b :: b
    b,c :: c
    c,d :: d
    d,e :: e
    e,f :: f
    f) + :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    + (a' :: a
    a',b' :: b
    b',c' :: c
    c',d' :: d
    d',e' :: e
    e',f' :: f
    f') = (a
    aa -> a -> a
    forall a. Num a => a -> a -> a
    +a
    a',b
    bb -> b -> b
    forall a. Num a => a -> a -> a
    +b
    b',c
    cc -> c -> c
    forall a. Num a => a -> a -> a
    +c
    c',d
    dd -> d -> d
    forall a. Num a => a -> a -> a
    +d
    d',e
    ee -> e -> e
    forall a. Num a => a -> a -> a
    +e
    e',f
    ff -> f -> f
    forall a. Num a => a -> a -> a
    +f
    f')
      (a :: a
    a,b :: b
    b,c :: c
    c,d :: d
    d,e :: e
    e,f :: f
    f) - :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    - (a' :: a
    a',b' :: b
    b',c' :: c
    c',d' :: d
    d',e' :: e
    e',f' :: f
    f') = (a
    aa -> a -> a
    forall a. Num a => a -> a -> a
    -a
    a',b
    bb -> b -> b
    forall a. Num a => a -> a -> a
    -b
    b',c
    cc -> c -> c
    forall a. Num a => a -> a -> a
    -c
    c',d
    dd -> d -> d
    forall a. Num a => a -> a -> a
    -d
    d',e
    ee -> e -> e
    forall a. Num a => a -> a -> a
    -e
    e',f
    ff -> f -> f
    forall a. Num a => a -> a -> a
    -f
    f')
      (a :: a
    a,b :: b
    b,c :: c
    c,d :: d
    d,e :: e
    e,f :: f
    f) * :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    * (a' :: a
    a',b' :: b
    b',c' :: c
    c',d' :: d
    d',e' :: e
    e',f' :: f
    f') = (a
    aa -> a -> a
    forall a. Num a => a -> a -> a
    *a
    a',b
    bb -> b -> b
    forall a. Num a => a -> a -> a
    *b
    b',c
    cc -> c -> c
    forall a. Num a => a -> a -> a
    *c
    c',d
    dd -> d -> d
    forall a. Num a => a -> a -> a
    *d
    d',e
    ee -> e -> e
    forall a. Num a => a -> a -> a
    *e
    e',f
    ff -> f -> f
    forall a. Num a => a -> a -> a
    *f
    f')
      negate :: (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    negate = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (a, b, c, d, e, f)
    -> (a, b, c, d, e, f)
    forall a u b v c w d x e y f t.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (a, b, c, d, e, f)
    -> (u, v, w, x, y, t)
    lift6 a -> a
    forall a. Num a => a -> a
    negate b -> b
    forall a. Num a => a -> a
    negate c -> c
    forall a. Num a => a -> a
    negate d -> d
    forall a. Num a => a -> a
    negate e -> e
    forall a. Num a => a -> a
    negate f -> f
    forall a. Num a => a -> a
    negate
      abs :: (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    abs    = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (a, b, c, d, e, f)
    -> (a, b, c, d, e, f)
    forall a u b v c w d x e y f t.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (a, b, c, d, e, f)
    -> (u, v, w, x, y, t)
    lift6 a -> a
    forall a. Num a => a -> a
    abs b -> b
    forall a. Num a => a -> a
    abs c -> c
    forall a. Num a => a -> a
    abs d -> d
    forall a. Num a => a -> a
    abs e -> e
    forall a. Num a => a -> a
    abs f -> f
    forall a. Num a => a -> a
    abs
      signum :: (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    signum = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (a, b, c, d, e, f)
    -> (a, b, c, d, e, f)
    forall a u b v c w d x e y f t.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (a, b, c, d, e, f)
    -> (u, v, w, x, y, t)
    lift6 a -> a
    forall a. Num a => a -> a
    signum b -> b
    forall a. Num a => a -> a
    signum c -> c
    forall a. Num a => a -> a
    signum d -> d
    forall a. Num a => a -> a
    signum e -> e
    forall a. Num a => a -> a
    signum f -> f
    forall a. Num a => a -> a
    signum

    instance (Fractional a, Fractional b, Fractional c, Fractional d, Fractional e, Fractional f)
        => Fractional (a,b,c,d,e,f) where
      fromRational :: Rational -> (a, b, c, d, e, f)
    fromRational x :: Rational
    x = (Rational -> a
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> b
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> c
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> d
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> e
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> f
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x)
      recip :: (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    recip = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (a, b, c, d, e, f)
    -> (a, b, c, d, e, f)
    forall a u b v c w d x e y f t.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (a, b, c, d, e, f)
    -> (u, v, w, x, y, t)
    lift6 a -> a
    forall a. Fractional a => a -> a
    recip b -> b
    forall a. Fractional a => a -> a
    recip c -> c
    forall a. Fractional a => a -> a
    recip d -> d
    forall a. Fractional a => a -> a
    recip e -> e
    forall a. Fractional a => a -> a
    recip f -> f
    forall a. Fractional a => a -> a
    recip

    instance (Floating a, Floating b, Floating c, Floating d, Floating e, Floating f)
        => Floating (a,b,c,d,e,f) where
      pi :: (a, b, c, d, e, f)
    pi    = (a
    forall a. Floating a => a
    pi,b
    forall a. Floating a => a
    pi,c
    forall a. Floating a => a
    pi,d
    forall a. Floating a => a
    pi,e
    forall a. Floating a => a
    pi,f
    forall a. Floating a => a
    pi)
      exp :: (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    exp   = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (a, b, c, d, e, f)
    -> (a, b, c, d, e, f)
    forall a u b v c w d x e y f t.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (a, b, c, d, e, f)
    -> (u, v, w, x, y, t)
    lift6 a -> a
    forall a. Floating a => a -> a
    exp b -> b
    forall a. Floating a => a -> a
    exp c -> c
    forall a. Floating a => a -> a
    exp d -> d
    forall a. Floating a => a -> a
    exp e -> e
    forall a. Floating a => a -> a
    exp f -> f
    forall a. Floating a => a -> a
    exp
      log :: (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    log   = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (a, b, c, d, e, f)
    -> (a, b, c, d, e, f)
    forall a u b v c w d x e y f t.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (a, b, c, d, e, f)
    -> (u, v, w, x, y, t)
    lift6 a -> a
    forall a. Floating a => a -> a
    log b -> b
    forall a. Floating a => a -> a
    log c -> c
    forall a. Floating a => a -> a
    log d -> d
    forall a. Floating a => a -> a
    log e -> e
    forall a. Floating a => a -> a
    log f -> f
    forall a. Floating a => a -> a
    log
      sqrt :: (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    sqrt  = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (a, b, c, d, e, f)
    -> (a, b, c, d, e, f)
    forall a u b v c w d x e y f t.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (a, b, c, d, e, f)
    -> (u, v, w, x, y, t)
    lift6 a -> a
    forall a. Floating a => a -> a
    sqrt b -> b
    forall a. Floating a => a -> a
    sqrt c -> c
    forall a. Floating a => a -> a
    sqrt d -> d
    forall a. Floating a => a -> a
    sqrt e -> e
    forall a. Floating a => a -> a
    sqrt f -> f
    forall a. Floating a => a -> a
    sqrt
      sin :: (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    sin   = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (a, b, c, d, e, f)
    -> (a, b, c, d, e, f)
    forall a u b v c w d x e y f t.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (a, b, c, d, e, f)
    -> (u, v, w, x, y, t)
    lift6 a -> a
    forall a. Floating a => a -> a
    sin b -> b
    forall a. Floating a => a -> a
    sin c -> c
    forall a. Floating a => a -> a
    sin d -> d
    forall a. Floating a => a -> a
    sin e -> e
    forall a. Floating a => a -> a
    sin f -> f
    forall a. Floating a => a -> a
    sin
      cos :: (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    cos   = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (a, b, c, d, e, f)
    -> (a, b, c, d, e, f)
    forall a u b v c w d x e y f t.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (a, b, c, d, e, f)
    -> (u, v, w, x, y, t)
    lift6 a -> a
    forall a. Floating a => a -> a
    cos b -> b
    forall a. Floating a => a -> a
    cos c -> c
    forall a. Floating a => a -> a
    cos d -> d
    forall a. Floating a => a -> a
    cos e -> e
    forall a. Floating a => a -> a
    cos f -> f
    forall a. Floating a => a -> a
    cos
      sinh :: (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    sinh  = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (a, b, c, d, e, f)
    -> (a, b, c, d, e, f)
    forall a u b v c w d x e y f t.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (a, b, c, d, e, f)
    -> (u, v, w, x, y, t)
    lift6 a -> a
    forall a. Floating a => a -> a
    sinh b -> b
    forall a. Floating a => a -> a
    sinh c -> c
    forall a. Floating a => a -> a
    sinh d -> d
    forall a. Floating a => a -> a
    sinh e -> e
    forall a. Floating a => a -> a
    sinh f -> f
    forall a. Floating a => a -> a
    sinh
      cosh :: (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    cosh  = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (a, b, c, d, e, f)
    -> (a, b, c, d, e, f)
    forall a u b v c w d x e y f t.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (a, b, c, d, e, f)
    -> (u, v, w, x, y, t)
    lift6 a -> a
    forall a. Floating a => a -> a
    cosh b -> b
    forall a. Floating a => a -> a
    cosh c -> c
    forall a. Floating a => a -> a
    cosh d -> d
    forall a. Floating a => a -> a
    cosh e -> e
    forall a. Floating a => a -> a
    cosh f -> f
    forall a. Floating a => a -> a
    cosh
      asin :: (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    asin  = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (a, b, c, d, e, f)
    -> (a, b, c, d, e, f)
    forall a u b v c w d x e y f t.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (a, b, c, d, e, f)
    -> (u, v, w, x, y, t)
    lift6 a -> a
    forall a. Floating a => a -> a
    asin b -> b
    forall a. Floating a => a -> a
    asin c -> c
    forall a. Floating a => a -> a
    asin d -> d
    forall a. Floating a => a -> a
    asin e -> e
    forall a. Floating a => a -> a
    asin f -> f
    forall a. Floating a => a -> a
    asin
      acos :: (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    acos  = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (a, b, c, d, e, f)
    -> (a, b, c, d, e, f)
    forall a u b v c w d x e y f t.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (a, b, c, d, e, f)
    -> (u, v, w, x, y, t)
    lift6 a -> a
    forall a. Floating a => a -> a
    acos b -> b
    forall a. Floating a => a -> a
    acos c -> c
    forall a. Floating a => a -> a
    acos d -> d
    forall a. Floating a => a -> a
    acos e -> e
    forall a. Floating a => a -> a
    acos f -> f
    forall a. Floating a => a -> a
    acos
      atan :: (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    atan  = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (a, b, c, d, e, f)
    -> (a, b, c, d, e, f)
    forall a u b v c w d x e y f t.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (a, b, c, d, e, f)
    -> (u, v, w, x, y, t)
    lift6 a -> a
    forall a. Floating a => a -> a
    atan b -> b
    forall a. Floating a => a -> a
    atan c -> c
    forall a. Floating a => a -> a
    atan d -> d
    forall a. Floating a => a -> a
    atan e -> e
    forall a. Floating a => a -> a
    atan f -> f
    forall a. Floating a => a -> a
    atan
      asinh :: (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    asinh = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (a, b, c, d, e, f)
    -> (a, b, c, d, e, f)
    forall a u b v c w d x e y f t.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (a, b, c, d, e, f)
    -> (u, v, w, x, y, t)
    lift6 a -> a
    forall a. Floating a => a -> a
    asinh b -> b
    forall a. Floating a => a -> a
    asinh c -> c
    forall a. Floating a => a -> a
    asinh d -> d
    forall a. Floating a => a -> a
    asinh e -> e
    forall a. Floating a => a -> a
    asinh f -> f
    forall a. Floating a => a -> a
    asinh
      acosh :: (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    acosh = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (a, b, c, d, e, f)
    -> (a, b, c, d, e, f)
    forall a u b v c w d x e y f t.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (a, b, c, d, e, f)
    -> (u, v, w, x, y, t)
    lift6 a -> a
    forall a. Floating a => a -> a
    acosh b -> b
    forall a. Floating a => a -> a
    acosh c -> c
    forall a. Floating a => a -> a
    acosh d -> d
    forall a. Floating a => a -> a
    acosh e -> e
    forall a. Floating a => a -> a
    acosh f -> f
    forall a. Floating a => a -> a
    acosh
      atanh :: (a, b, c, d, e, f) -> (a, b, c, d, e, f)
    atanh = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (a, b, c, d, e, f)
    -> (a, b, c, d, e, f)
    forall a u b v c w d x e y f t.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (a, b, c, d, e, f)
    -> (u, v, w, x, y, t)
    lift6 a -> a
    forall a. Floating a => a -> a
    atanh b -> b
    forall a. Floating a => a -> a
    atanh c -> c
    forall a. Floating a => a -> a
    atanh d -> d
    forall a. Floating a => a -> a
    atanh e -> e
    forall a. Floating a => a -> a
    atanh f -> f
    forall a. Floating a => a -> a
    atanh

    lift7 :: (a->u) -> (b->v) -> (c->w) -> (d->x) -> (e->y) -> (f->t) -> (g->z)
          -> (a,b,c,d,e,f,g) -> (u,v,w,x,y,t,z)
    lift7 :: (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (g -> z)
    -> (a, b, c, d, e, f, g)
    -> (u, v, w, x, y, t, z)
    lift7 fa :: a -> u
    fa fb :: b -> v
    fb fc :: c -> w
    fc fd :: d -> x
    fd fe :: e -> y
    fe ff :: f -> t
    ff fg :: g -> z
    fg (a :: a
    a,b :: b
    b,c :: c
    c,d :: d
    d,e :: e
    e,f :: f
    f,g :: g
    g) =
      (a -> u
    fa a
    a, b -> v
    fb b
    b, c -> w
    fc c
    c, d -> x
    fd d
    d, e -> y
    fe e
    e, f -> t
    ff f
    f, g -> z
    fg g
    g)

    instance (Num a, Num b, Num c, Num d, Num e, Num f, Num g) => Num (a,b,c,d,e,f,g) where
      fromInteger :: Integer -> (a, b, c, d, e, f, g)
    fromInteger n :: Integer
    n = (Integer -> a
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> b
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> c
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> d
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> e
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> f
    forall a. Num a => Integer -> a
    fromInteger Integer
    n, Integer -> g
    forall a. Num a => Integer -> a
    fromInteger Integer
    n)
      (a :: a
    a,b :: b
    b,c :: c
    c,d :: d
    d,e :: e
    e,f :: f
    f,g :: g
    g) + :: (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    + (a' :: a
    a',b' :: b
    b',c' :: c
    c',d' :: d
    d',e' :: e
    e',f' :: f
    f',g' :: g
    g') = (a
    aa -> a -> a
    forall a. Num a => a -> a -> a
    +a
    a',b
    bb -> b -> b
    forall a. Num a => a -> a -> a
    +b
    b',c
    cc -> c -> c
    forall a. Num a => a -> a -> a
    +c
    c',d
    dd -> d -> d
    forall a. Num a => a -> a -> a
    +d
    d',e
    ee -> e -> e
    forall a. Num a => a -> a -> a
    +e
    e',f
    ff -> f -> f
    forall a. Num a => a -> a -> a
    +f
    f',g
    gg -> g -> g
    forall a. Num a => a -> a -> a
    +g
    g')
      (a :: a
    a,b :: b
    b,c :: c
    c,d :: d
    d,e :: e
    e,f :: f
    f,g :: g
    g) - :: (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    - (a' :: a
    a',b' :: b
    b',c' :: c
    c',d' :: d
    d',e' :: e
    e',f' :: f
    f',g' :: g
    g') = (a
    aa -> a -> a
    forall a. Num a => a -> a -> a
    -a
    a',b
    bb -> b -> b
    forall a. Num a => a -> a -> a
    -b
    b',c
    cc -> c -> c
    forall a. Num a => a -> a -> a
    -c
    c',d
    dd -> d -> d
    forall a. Num a => a -> a -> a
    -d
    d',e
    ee -> e -> e
    forall a. Num a => a -> a -> a
    -e
    e',f
    ff -> f -> f
    forall a. Num a => a -> a -> a
    -f
    f',g
    gg -> g -> g
    forall a. Num a => a -> a -> a
    -g
    g')
      (a :: a
    a,b :: b
    b,c :: c
    c,d :: d
    d,e :: e
    e,f :: f
    f,g :: g
    g) * :: (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    * (a' :: a
    a',b' :: b
    b',c' :: c
    c',d' :: d
    d',e' :: e
    e',f' :: f
    f',g' :: g
    g') = (a
    aa -> a -> a
    forall a. Num a => a -> a -> a
    *a
    a',b
    bb -> b -> b
    forall a. Num a => a -> a -> a
    *b
    b',c
    cc -> c -> c
    forall a. Num a => a -> a -> a
    *c
    c',d
    dd -> d -> d
    forall a. Num a => a -> a -> a
    *d
    d',e
    ee -> e -> e
    forall a. Num a => a -> a -> a
    *e
    e',f
    ff -> f -> f
    forall a. Num a => a -> a -> a
    *f
    f',g
    gg -> g -> g
    forall a. Num a => a -> a -> a
    *g
    g')
      negate :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    negate = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (g -> g)
    -> (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g)
    forall a u b v c w d x e y f t g z.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (g -> z)
    -> (a, b, c, d, e, f, g)
    -> (u, v, w, x, y, t, z)
    lift7 a -> a
    forall a. Num a => a -> a
    negate b -> b
    forall a. Num a => a -> a
    negate c -> c
    forall a. Num a => a -> a
    negate d -> d
    forall a. Num a => a -> a
    negate e -> e
    forall a. Num a => a -> a
    negate f -> f
    forall a. Num a => a -> a
    negate g -> g
    forall a. Num a => a -> a
    negate
      abs :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    abs    = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (g -> g)
    -> (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g)
    forall a u b v c w d x e y f t g z.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (g -> z)
    -> (a, b, c, d, e, f, g)
    -> (u, v, w, x, y, t, z)
    lift7 a -> a
    forall a. Num a => a -> a
    abs b -> b
    forall a. Num a => a -> a
    abs c -> c
    forall a. Num a => a -> a
    abs d -> d
    forall a. Num a => a -> a
    abs e -> e
    forall a. Num a => a -> a
    abs f -> f
    forall a. Num a => a -> a
    abs g -> g
    forall a. Num a => a -> a
    abs
      signum :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    signum = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (g -> g)
    -> (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g)
    forall a u b v c w d x e y f t g z.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (g -> z)
    -> (a, b, c, d, e, f, g)
    -> (u, v, w, x, y, t, z)
    lift7 a -> a
    forall a. Num a => a -> a
    signum b -> b
    forall a. Num a => a -> a
    signum c -> c
    forall a. Num a => a -> a
    signum d -> d
    forall a. Num a => a -> a
    signum e -> e
    forall a. Num a => a -> a
    signum f -> f
    forall a. Num a => a -> a
    signum g -> g
    forall a. Num a => a -> a
    signum

    instance (Fractional a, Fractional b, Fractional c, Fractional d, Fractional e, Fractional f, Fractional g)
        => Fractional (a,b,c,d,e,f,g) where
      fromRational :: Rational -> (a, b, c, d, e, f, g)
    fromRational x :: Rational
    x = (Rational -> a
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> b
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> c
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> d
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> e
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> f
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x, Rational -> g
    forall a. Fractional a => Rational -> a
    fromRational Rational
    x)
      recip :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    recip = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (g -> g)
    -> (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g)
    forall a u b v c w d x e y f t g z.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (g -> z)
    -> (a, b, c, d, e, f, g)
    -> (u, v, w, x, y, t, z)
    lift7 a -> a
    forall a. Fractional a => a -> a
    recip b -> b
    forall a. Fractional a => a -> a
    recip c -> c
    forall a. Fractional a => a -> a
    recip d -> d
    forall a. Fractional a => a -> a
    recip e -> e
    forall a. Fractional a => a -> a
    recip f -> f
    forall a. Fractional a => a -> a
    recip g -> g
    forall a. Fractional a => a -> a
    recip

    instance (Floating a, Floating b, Floating c, Floating d, Floating e, Floating f, Floating g)
        => Floating (a,b,c,d,e,f,g) where
      pi :: (a, b, c, d, e, f, g)
    pi    = (a
    forall a. Floating a => a
    pi,b
    forall a. Floating a => a
    pi,c
    forall a. Floating a => a
    pi,d
    forall a. Floating a => a
    pi,e
    forall a. Floating a => a
    pi,f
    forall a. Floating a => a
    pi,g
    forall a. Floating a => a
    pi)
      exp :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    exp   = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (g -> g)
    -> (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g)
    forall a u b v c w d x e y f t g z.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (g -> z)
    -> (a, b, c, d, e, f, g)
    -> (u, v, w, x, y, t, z)
    lift7 a -> a
    forall a. Floating a => a -> a
    exp b -> b
    forall a. Floating a => a -> a
    exp c -> c
    forall a. Floating a => a -> a
    exp d -> d
    forall a. Floating a => a -> a
    exp e -> e
    forall a. Floating a => a -> a
    exp f -> f
    forall a. Floating a => a -> a
    exp g -> g
    forall a. Floating a => a -> a
    exp
      log :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    log   = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (g -> g)
    -> (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g)
    forall a u b v c w d x e y f t g z.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (g -> z)
    -> (a, b, c, d, e, f, g)
    -> (u, v, w, x, y, t, z)
    lift7 a -> a
    forall a. Floating a => a -> a
    log b -> b
    forall a. Floating a => a -> a
    log c -> c
    forall a. Floating a => a -> a
    log d -> d
    forall a. Floating a => a -> a
    log e -> e
    forall a. Floating a => a -> a
    log f -> f
    forall a. Floating a => a -> a
    log g -> g
    forall a. Floating a => a -> a
    log
      sqrt :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    sqrt  = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (g -> g)
    -> (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g)
    forall a u b v c w d x e y f t g z.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (g -> z)
    -> (a, b, c, d, e, f, g)
    -> (u, v, w, x, y, t, z)
    lift7 a -> a
    forall a. Floating a => a -> a
    sqrt b -> b
    forall a. Floating a => a -> a
    sqrt c -> c
    forall a. Floating a => a -> a
    sqrt d -> d
    forall a. Floating a => a -> a
    sqrt e -> e
    forall a. Floating a => a -> a
    sqrt f -> f
    forall a. Floating a => a -> a
    sqrt g -> g
    forall a. Floating a => a -> a
    sqrt
      sin :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    sin   = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (g -> g)
    -> (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g)
    forall a u b v c w d x e y f t g z.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (g -> z)
    -> (a, b, c, d, e, f, g)
    -> (u, v, w, x, y, t, z)
    lift7 a -> a
    forall a. Floating a => a -> a
    sin b -> b
    forall a. Floating a => a -> a
    sin c -> c
    forall a. Floating a => a -> a
    sin d -> d
    forall a. Floating a => a -> a
    sin e -> e
    forall a. Floating a => a -> a
    sin f -> f
    forall a. Floating a => a -> a
    sin g -> g
    forall a. Floating a => a -> a
    sin
      cos :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    cos   = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (g -> g)
    -> (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g)
    forall a u b v c w d x e y f t g z.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (g -> z)
    -> (a, b, c, d, e, f, g)
    -> (u, v, w, x, y, t, z)
    lift7 a -> a
    forall a. Floating a => a -> a
    cos b -> b
    forall a. Floating a => a -> a
    cos c -> c
    forall a. Floating a => a -> a
    cos d -> d
    forall a. Floating a => a -> a
    cos e -> e
    forall a. Floating a => a -> a
    cos f -> f
    forall a. Floating a => a -> a
    cos g -> g
    forall a. Floating a => a -> a
    cos
      sinh :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    sinh  = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (g -> g)
    -> (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g)
    forall a u b v c w d x e y f t g z.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (g -> z)
    -> (a, b, c, d, e, f, g)
    -> (u, v, w, x, y, t, z)
    lift7 a -> a
    forall a. Floating a => a -> a
    sinh b -> b
    forall a. Floating a => a -> a
    sinh c -> c
    forall a. Floating a => a -> a
    sinh d -> d
    forall a. Floating a => a -> a
    sinh e -> e
    forall a. Floating a => a -> a
    sinh f -> f
    forall a. Floating a => a -> a
    sinh g -> g
    forall a. Floating a => a -> a
    sinh
      cosh :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    cosh  = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (g -> g)
    -> (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g)
    forall a u b v c w d x e y f t g z.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (g -> z)
    -> (a, b, c, d, e, f, g)
    -> (u, v, w, x, y, t, z)
    lift7 a -> a
    forall a. Floating a => a -> a
    cosh b -> b
    forall a. Floating a => a -> a
    cosh c -> c
    forall a. Floating a => a -> a
    cosh d -> d
    forall a. Floating a => a -> a
    cosh e -> e
    forall a. Floating a => a -> a
    cosh f -> f
    forall a. Floating a => a -> a
    cosh g -> g
    forall a. Floating a => a -> a
    cosh
      asin :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    asin  = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (g -> g)
    -> (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g)
    forall a u b v c w d x e y f t g z.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (g -> z)
    -> (a, b, c, d, e, f, g)
    -> (u, v, w, x, y, t, z)
    lift7 a -> a
    forall a. Floating a => a -> a
    asin b -> b
    forall a. Floating a => a -> a
    asin c -> c
    forall a. Floating a => a -> a
    asin d -> d
    forall a. Floating a => a -> a
    asin e -> e
    forall a. Floating a => a -> a
    asin f -> f
    forall a. Floating a => a -> a
    asin g -> g
    forall a. Floating a => a -> a
    asin
      acos :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    acos  = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (g -> g)
    -> (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g)
    forall a u b v c w d x e y f t g z.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (g -> z)
    -> (a, b, c, d, e, f, g)
    -> (u, v, w, x, y, t, z)
    lift7 a -> a
    forall a. Floating a => a -> a
    acos b -> b
    forall a. Floating a => a -> a
    acos c -> c
    forall a. Floating a => a -> a
    acos d -> d
    forall a. Floating a => a -> a
    acos e -> e
    forall a. Floating a => a -> a
    acos f -> f
    forall a. Floating a => a -> a
    acos g -> g
    forall a. Floating a => a -> a
    acos
      atan :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    atan  = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (g -> g)
    -> (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g)
    forall a u b v c w d x e y f t g z.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (g -> z)
    -> (a, b, c, d, e, f, g)
    -> (u, v, w, x, y, t, z)
    lift7 a -> a
    forall a. Floating a => a -> a
    atan b -> b
    forall a. Floating a => a -> a
    atan c -> c
    forall a. Floating a => a -> a
    atan d -> d
    forall a. Floating a => a -> a
    atan e -> e
    forall a. Floating a => a -> a
    atan f -> f
    forall a. Floating a => a -> a
    atan g -> g
    forall a. Floating a => a -> a
    atan
      asinh :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    asinh = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (g -> g)
    -> (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g)
    forall a u b v c w d x e y f t g z.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (g -> z)
    -> (a, b, c, d, e, f, g)
    -> (u, v, w, x, y, t, z)
    lift7 a -> a
    forall a. Floating a => a -> a
    asinh b -> b
    forall a. Floating a => a -> a
    asinh c -> c
    forall a. Floating a => a -> a
    asinh d -> d
    forall a. Floating a => a -> a
    asinh e -> e
    forall a. Floating a => a -> a
    asinh f -> f
    forall a. Floating a => a -> a
    asinh g -> g
    forall a. Floating a => a -> a
    asinh
      acosh :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    acosh = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (g -> g)
    -> (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g)
    forall a u b v c w d x e y f t g z.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (g -> z)
    -> (a, b, c, d, e, f, g)
    -> (u, v, w, x, y, t, z)
    lift7 a -> a
    forall a. Floating a => a -> a
    acosh b -> b
    forall a. Floating a => a -> a
    acosh c -> c
    forall a. Floating a => a -> a
    acosh d -> d
    forall a. Floating a => a -> a
    acosh e -> e
    forall a. Floating a => a -> a
    acosh f -> f
    forall a. Floating a => a -> a
    acosh g -> g
    forall a. Floating a => a -> a
    acosh
      atanh :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g)
    atanh = (a -> a)
    -> (b -> b)
    -> (c -> c)
    -> (d -> d)
    -> (e -> e)
    -> (f -> f)
    -> (g -> g)
    -> (a, b, c, d, e, f, g)
    -> (a, b, c, d, e, f, g)
    forall a u b v c w d x e y f t g z.
    (a -> u)
    -> (b -> v)
    -> (c -> w)
    -> (d -> x)
    -> (e -> y)
    -> (f -> t)
    -> (g -> z)
    -> (a, b, c, d, e, f, g)
    -> (u, v, w, x, y, t, z)
    lift7 a -> a
    forall a. Floating a => a -> a
    atanh b -> b
    forall a. Floating a => a -> a
    atanh c -> c
    forall a. Floating a => a -> a
    atanh d -> d
    forall a. Floating a => a -> a
    atanh e -> e
    forall a. Floating a => a -> a
    atanh f -> f
    forall a. Floating a => a -> a
    atanh g -> g
    forall a. Floating a => a -> a
    atanh

    {--------------------------------------------------------------------
        Some experiments in Enum and Integral instances for tuples
    --------------------------------------------------------------------}

    {-

    -- Integral needs Enum

    instance (Enum a, Enum b, Bounded b) => Enum (a,b) where
      toEnum = noPair "toEnum"
      fromEnum = noPair "fromEnum"
      -- enumerate consistently with Ord
      enumFromTo (alo,blo) (ahi,bhi) =
           [ (alo,b) | b <- [blo .. maxBound] ]
        ++ [ (a  ,b) | a <- [succ alo .. pred ahi], b <- [minBound .. maxBound] ]
        ++ [ (ahi,b) | b <- [minBound .. bhi] ]
      -- To do: replace enumFromTo def with an enumFromThenTo def

    -- deriving instance (Enum a, Enum b) => Enum (a,b)
    --
    --     The data constructors of `(,)' are not all in scope
    --       so you cannot derive an instance for it

    -- To do: toEnum and fromEnum

    {-
    -- Test:

    data Foo = A | B | C | D deriving (Enum,Bounded,Show)

    t1 :: [(Foo,Foo)]
    t1 = [(B,C) .. (C,C)]
    -}

    instance (Real a, Real b) => Real (a,b) where
      toRational = noPair "toRational"

    instance (Integral a, Integral b, Bounded b) => Integral (a,b) where
    --   (a,b) `quotRem` (a',b') = ((qa,qb),(ra,rb))
    --     where
    --       (qa,ra) = a `quotRem` a'
    --       (qb,rb) = b `quotRem` b'
      (a,b) `quotRem` (a',b') = transpose (a `quotRem` a' , b `quotRem` b')
        where
          transpose ((w,x),(y,z)) = ((w,y),(x,z)) -- to-do: pretty point-free
      toInteger (a , b::b) = toInteger a * widthB + toInteger b
       where
         widthB = toInteger (maxBound :: b) - toInteger (minBound :: b)

    {-
    t2 :: ((Int,Int),(Int,Int))
    t2 = (7,8) `quotRem` (2,3)

    t3 :: (Int,Int)
    t3 = (7,8) `quot` (2,3)

    t4 :: (Int,Int)
    t4 = (7,8) `rem` (2,3)
    -}

    {-
      (a,b) `quot` (a',b') = (a `quot` a', b `quot` b')

      rem           = liftA2 rem
      div           = liftA2 div
      mod           = liftA2 mod
      toInteger     = noOv "toInteger"
      x `quotRem` y = (x `quot` y, x `rem` y)
      x `divMod`  y = (x `div`  y, x `mod` y)
    -}

    -}