    module Foreign.Storable.Tuple where

    import qualified Foreign.Storable.Newtype as Newtype
    import Foreign.Storable.Record.Tuple (Tuple(Tuple, getTuple))
    import Foreign.Storable (Storable, sizeOf, alignment, peek, poke)
    import Data.Orphans ()

    instance (Storable a, Storable b) => Storable (a,b) where
       {-# INLINABLE sizeOf #-}
       sizeOf :: (a, b) -> Int
    sizeOf    = ((a, b) -> Tuple (a, b)) -> (a, b) -> Int
    forall core wrapper.
    Storable core =>
    (wrapper -> core) -> wrapper -> Int
    Newtype.sizeOf (a, b) -> Tuple (a, b)
    forall a. a -> Tuple a
    Tuple
       {-# INLINABLE alignment #-}
       alignment :: (a, b) -> Int
    alignment = ((a, b) -> Tuple (a, b)) -> (a, b) -> Int
    forall core wrapper.
    Storable core =>
    (wrapper -> core) -> wrapper -> Int
    Newtype.alignment (a, b) -> Tuple (a, b)
    forall a. a -> Tuple a
    Tuple
       {-# INLINABLE peek #-}
       peek :: Ptr (a, b) -> IO (a, b)
    peek      = (Tuple (a, b) -> (a, b)) -> Ptr (a, b) -> IO (a, b)
    forall core wrapper.
    Storable core =>
    (core -> wrapper) -> Ptr wrapper -> IO wrapper
    Newtype.peek Tuple (a, b) -> (a, b)
    forall a. Tuple a -> a
    getTuple
       {-# INLINABLE poke #-}
       poke :: Ptr (a, b) -> (a, b) -> IO ()
    poke      = ((a, b) -> Tuple (a, b)) -> Ptr (a, b) -> (a, b) -> IO ()
    forall core wrapper.
    Storable core =>
    (wrapper -> core) -> Ptr wrapper -> wrapper -> IO ()
    Newtype.poke (a, b) -> Tuple (a, b)
    forall a. a -> Tuple a
    Tuple

    instance (Storable a, Storable b, Storable c) => Storable (a,b,c) where
       {-# INLINABLE sizeOf #-}
       sizeOf :: (a, b, c) -> Int
    sizeOf    = ((a, b, c) -> Tuple (a, b, c)) -> (a, b, c) -> Int
    forall core wrapper.
    Storable core =>
    (wrapper -> core) -> wrapper -> Int
    Newtype.sizeOf (a, b, c) -> Tuple (a, b, c)
    forall a. a -> Tuple a
    Tuple
       {-# INLINABLE alignment #-}
       alignment :: (a, b, c) -> Int
    alignment = ((a, b, c) -> Tuple (a, b, c)) -> (a, b, c) -> Int
    forall core wrapper.
    Storable core =>
    (wrapper -> core) -> wrapper -> Int
    Newtype.alignment (a, b, c) -> Tuple (a, b, c)
    forall a. a -> Tuple a
    Tuple
       {-# INLINABLE peek #-}
       peek :: Ptr (a, b, c) -> IO (a, b, c)
    peek      = (Tuple (a, b, c) -> (a, b, c)) -> Ptr (a, b, c) -> IO (a, b, c)
    forall core wrapper.
    Storable core =>
    (core -> wrapper) -> Ptr wrapper -> IO wrapper
    Newtype.peek Tuple (a, b, c) -> (a, b, c)
    forall a. Tuple a -> a
    getTuple
       {-# INLINABLE poke #-}
       poke :: Ptr (a, b, c) -> (a, b, c) -> IO ()
    poke      = ((a, b, c) -> Tuple (a, b, c))
    -> Ptr (a, b, c) -> (a, b, c) -> IO ()
    forall core wrapper.
    Storable core =>
    (wrapper -> core) -> Ptr wrapper -> wrapper -> IO ()
    Newtype.poke (a, b, c) -> Tuple (a, b, c)
    forall a. a -> Tuple a
    Tuple

    instance
       (Storable a, Storable b, Storable c, Storable d) =>
          Storable (a,b,c,d) where
       {-# INLINABLE sizeOf #-}
       sizeOf :: (a, b, c, d) -> Int
    sizeOf    = ((a, b, c, d) -> Tuple (a, b, c, d)) -> (a, b, c, d) -> Int
    forall core wrapper.
    Storable core =>
    (wrapper -> core) -> wrapper -> Int
    Newtype.sizeOf (a, b, c, d) -> Tuple (a, b, c, d)
    forall a. a -> Tuple a
    Tuple
       {-# INLINABLE alignment #-}
       alignment :: (a, b, c, d) -> Int
    alignment = ((a, b, c, d) -> Tuple (a, b, c, d)) -> (a, b, c, d) -> Int
    forall core wrapper.
    Storable core =>
    (wrapper -> core) -> wrapper -> Int
    Newtype.alignment (a, b, c, d) -> Tuple (a, b, c, d)
    forall a. a -> Tuple a
    Tuple
       {-# INLINABLE peek #-}
       peek :: Ptr (a, b, c, d) -> IO (a, b, c, d)
    peek      = (Tuple (a, b, c, d) -> (a, b, c, d))
    -> Ptr (a, b, c, d) -> IO (a, b, c, d)
    forall core wrapper.
    Storable core =>
    (core -> wrapper) -> Ptr wrapper -> IO wrapper
    Newtype.peek Tuple (a, b, c, d) -> (a, b, c, d)
    forall a. Tuple a -> a
    getTuple
       {-# INLINABLE poke #-}
       poke :: Ptr (a, b, c, d) -> (a, b, c, d) -> IO ()
    poke      = ((a, b, c, d) -> Tuple (a, b, c, d))
    -> Ptr (a, b, c, d) -> (a, b, c, d) -> IO ()
    forall core wrapper.
    Storable core =>
    (wrapper -> core) -> Ptr wrapper -> wrapper -> IO ()
    Newtype.poke (a, b, c, d) -> Tuple (a, b, c, d)
    forall a. a -> Tuple a
    Tuple