    {-# LANGUAGE DeriveDataTypeable, CPP #-}
    {-# OPTIONS_HADDOCK hide #-}
    --------------------------------------------------------------------------------
    -- |
    -- Module      :  Graphics.Rendering.OpenGL.GL.VertexAttributes
    -- Copyright   :  (c) Sven Panne 2002-2019
    -- License     :  BSD3
    --
    -- Maintainer  :  Sven Panne <svenpanne@gmail.com>
    -- Stability   :  stable
    -- Portability :  portable
    --
    -- This is a purely internal module for auxiliary vertex attributes.
    --
    --------------------------------------------------------------------------------

    module Graphics.Rendering.OpenGL.GL.VertexAttributes (
       TexCoord1(..), TexCoord2(..), TexCoord3(..), TexCoord4(..),
       Normal3(..),
       FogCoord1(..),
       Color3(..), Color4(..),
       Index1(..)
    ) where

    #if !MIN_VERSION_base(4,8,0)
    import Control.Applicative ( Applicative(..) )
    #endif
    import Control.Monad
    import Data.Foldable
    import Data.Ix
    import Data.Traversable
    import Data.Typeable
    import Foreign.Marshal.Array
    import Foreign.Ptr
    import Foreign.Storable

    --------------------------------------------------------------------------------

    -- | Texture coordinates with /t/=0, /r/=0, and /q/=1.
    newtype TexCoord1 a = TexCoord1 a
       deriving (TexCoord1 a -> TexCoord1 a -> Bool
    (TexCoord1 a -> TexCoord1 a -> Bool)
    -> (TexCoord1 a -> TexCoord1 a -> Bool) -> Eq (TexCoord1 a)
    forall a. Eq a => TexCoord1 a -> TexCoord1 a -> Bool
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: forall a. Eq a => TexCoord1 a -> TexCoord1 a -> Bool
    == :: TexCoord1 a -> TexCoord1 a -> Bool
    $c/= :: forall a. Eq a => TexCoord1 a -> TexCoord1 a -> Bool
    /= :: TexCoord1 a -> TexCoord1 a -> Bool
    Eq, Eq (TexCoord1 a)
    Eq (TexCoord1 a) =>
    (TexCoord1 a -> TexCoord1 a -> Ordering)
    -> (TexCoord1 a -> TexCoord1 a -> Bool)
    -> (TexCoord1 a -> TexCoord1 a -> Bool)
    -> (TexCoord1 a -> TexCoord1 a -> Bool)
    -> (TexCoord1 a -> TexCoord1 a -> Bool)
    -> (TexCoord1 a -> TexCoord1 a -> TexCoord1 a)
    -> (TexCoord1 a -> TexCoord1 a -> TexCoord1 a)
    -> Ord (TexCoord1 a)
    TexCoord1 a -> TexCoord1 a -> Bool
    TexCoord1 a -> TexCoord1 a -> Ordering
    TexCoord1 a -> TexCoord1 a -> TexCoord1 a
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall a. Ord a => Eq (TexCoord1 a)
    forall a. Ord a => TexCoord1 a -> TexCoord1 a -> Bool
    forall a. Ord a => TexCoord1 a -> TexCoord1 a -> Ordering
    forall a. Ord a => TexCoord1 a -> TexCoord1 a -> TexCoord1 a
    $ccompare :: forall a. Ord a => TexCoord1 a -> TexCoord1 a -> Ordering
    compare :: TexCoord1 a -> TexCoord1 a -> Ordering
    $c< :: forall a. Ord a => TexCoord1 a -> TexCoord1 a -> Bool
    < :: TexCoord1 a -> TexCoord1 a -> Bool
    $c<= :: forall a. Ord a => TexCoord1 a -> TexCoord1 a -> Bool
    <= :: TexCoord1 a -> TexCoord1 a -> Bool
    $c> :: forall a. Ord a => TexCoord1 a -> TexCoord1 a -> Bool
    > :: TexCoord1 a -> TexCoord1 a -> Bool
    $c>= :: forall a. Ord a => TexCoord1 a -> TexCoord1 a -> Bool
    >= :: TexCoord1 a -> TexCoord1 a -> Bool
    $cmax :: forall a. Ord a => TexCoord1 a -> TexCoord1 a -> TexCoord1 a
    max :: TexCoord1 a -> TexCoord1 a -> TexCoord1 a
    $cmin :: forall a. Ord a => TexCoord1 a -> TexCoord1 a -> TexCoord1 a
    min :: TexCoord1 a -> TexCoord1 a -> TexCoord1 a
    Ord, Ord (TexCoord1 a)
    Ord (TexCoord1 a) =>
    ((TexCoord1 a, TexCoord1 a) -> [TexCoord1 a])
    -> ((TexCoord1 a, TexCoord1 a) -> TexCoord1 a -> Int)
    -> ((TexCoord1 a, TexCoord1 a) -> TexCoord1 a -> Int)
    -> ((TexCoord1 a, TexCoord1 a) -> TexCoord1 a -> Bool)
    -> ((TexCoord1 a, TexCoord1 a) -> Int)
    -> ((TexCoord1 a, TexCoord1 a) -> Int)
    -> Ix (TexCoord1 a)
    (TexCoord1 a, TexCoord1 a) -> Int
    (TexCoord1 a, TexCoord1 a) -> [TexCoord1 a]
    (TexCoord1 a, TexCoord1 a) -> TexCoord1 a -> Bool
    (TexCoord1 a, TexCoord1 a) -> TexCoord1 a -> Int
    forall a.
    Ord a =>
    ((a, a) -> [a])
    -> ((a, a) -> a -> Int)
    -> ((a, a) -> a -> Int)
    -> ((a, a) -> a -> Bool)
    -> ((a, a) -> Int)
    -> ((a, a) -> Int)
    -> Ix a
    forall a. Ix a => Ord (TexCoord1 a)
    forall a. Ix a => (TexCoord1 a, TexCoord1 a) -> Int
    forall a. Ix a => (TexCoord1 a, TexCoord1 a) -> [TexCoord1 a]
    forall a. Ix a => (TexCoord1 a, TexCoord1 a) -> TexCoord1 a -> Bool
    forall a. Ix a => (TexCoord1 a, TexCoord1 a) -> TexCoord1 a -> Int
    $crange :: forall a. Ix a => (TexCoord1 a, TexCoord1 a) -> [TexCoord1 a]
    range :: (TexCoord1 a, TexCoord1 a) -> [TexCoord1 a]
    $cindex :: forall a. Ix a => (TexCoord1 a, TexCoord1 a) -> TexCoord1 a -> Int
    index :: (TexCoord1 a, TexCoord1 a) -> TexCoord1 a -> Int
    $cunsafeIndex :: forall a. Ix a => (TexCoord1 a, TexCoord1 a) -> TexCoord1 a -> Int
    unsafeIndex :: (TexCoord1 a, TexCoord1 a) -> TexCoord1 a -> Int
    $cinRange :: forall a. Ix a => (TexCoord1 a, TexCoord1 a) -> TexCoord1 a -> Bool
    inRange :: (TexCoord1 a, TexCoord1 a) -> TexCoord1 a -> Bool
    $crangeSize :: forall a. Ix a => (TexCoord1 a, TexCoord1 a) -> Int
    rangeSize :: (TexCoord1 a, TexCoord1 a) -> Int
    $cunsafeRangeSize :: forall a. Ix a => (TexCoord1 a, TexCoord1 a) -> Int
    unsafeRangeSize :: (TexCoord1 a, TexCoord1 a) -> Int
    Ix, TexCoord1 a
    TexCoord1 a -> TexCoord1 a -> Bounded (TexCoord1 a)
    forall a. a -> a -> Bounded a
    forall a. Bounded a => TexCoord1 a
    $cminBound :: forall a. Bounded a => TexCoord1 a
    minBound :: TexCoord1 a
    $cmaxBound :: forall a. Bounded a => TexCoord1 a
    maxBound :: TexCoord1 a
    Bounded, Int -> TexCoord1 a -> ShowS
    [TexCoord1 a] -> ShowS
    TexCoord1 a -> String
    (Int -> TexCoord1 a -> ShowS)
    -> (TexCoord1 a -> String)
    -> ([TexCoord1 a] -> ShowS)
    -> Show (TexCoord1 a)
    forall a. Show a => Int -> TexCoord1 a -> ShowS
    forall a. Show a => [TexCoord1 a] -> ShowS
    forall a. Show a => TexCoord1 a -> String
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: forall a. Show a => Int -> TexCoord1 a -> ShowS
    showsPrec :: Int -> TexCoord1 a -> ShowS
    $cshow :: forall a. Show a => TexCoord1 a -> String
    show :: TexCoord1 a -> String
    $cshowList :: forall a. Show a => [TexCoord1 a] -> ShowS
    showList :: [TexCoord1 a] -> ShowS
    Show, ReadPrec [TexCoord1 a]
    ReadPrec (TexCoord1 a)
    Int -> ReadS (TexCoord1 a)
    ReadS [TexCoord1 a]
    (Int -> ReadS (TexCoord1 a))
    -> ReadS [TexCoord1 a]
    -> ReadPrec (TexCoord1 a)
    -> ReadPrec [TexCoord1 a]
    -> Read (TexCoord1 a)
    forall a. Read a => ReadPrec [TexCoord1 a]
    forall a. Read a => ReadPrec (TexCoord1 a)
    forall a. Read a => Int -> ReadS (TexCoord1 a)
    forall a. Read a => ReadS [TexCoord1 a]
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: forall a. Read a => Int -> ReadS (TexCoord1 a)
    readsPrec :: Int -> ReadS (TexCoord1 a)
    $creadList :: forall a. Read a => ReadS [TexCoord1 a]
    readList :: ReadS [TexCoord1 a]
    $creadPrec :: forall a. Read a => ReadPrec (TexCoord1 a)
    readPrec :: ReadPrec (TexCoord1 a)
    $creadListPrec :: forall a. Read a => ReadPrec [TexCoord1 a]
    readListPrec :: ReadPrec [TexCoord1 a]
    Read, Typeable)

    instance Functor TexCoord1 where
       fmap :: forall a b. (a -> b) -> TexCoord1 a -> TexCoord1 b
    fmap a -> b
    f (TexCoord1 a
    x) = b -> TexCoord1 b
    forall a. a -> TexCoord1 a
    TexCoord1 (a -> b
    f a
    x)

    instance Applicative TexCoord1 where
       pure :: forall a. a -> TexCoord1 a
    pure a
    a = a -> TexCoord1 a
    forall a. a -> TexCoord1 a
    TexCoord1 a
    a
       TexCoord1 a -> b
    f <*> :: forall a b. TexCoord1 (a -> b) -> TexCoord1 a -> TexCoord1 b
    <*> TexCoord1 a
    x = b -> TexCoord1 b
    forall a. a -> TexCoord1 a
    TexCoord1 (a -> b
    f a
    x)

    instance Foldable TexCoord1 where
       foldr :: forall a b. (a -> b -> b) -> b -> TexCoord1 a -> b
    foldr a -> b -> b
    f b
    a (TexCoord1 a
    x) = a
    x `f ` b
    a
       foldl :: forall b a. (b -> a -> b) -> b -> TexCoord1 a -> b
    foldl b -> a -> b
    f b
    a (TexCoord1 a
    x) = b
    a b -> a -> b
    `f` a
    x
       foldr1 :: forall a. (a -> a -> a) -> TexCoord1 a -> a
    foldr1 a -> a -> a
    _ (TexCoord1 a
    x) = a
    x
       foldl1 :: forall a. (a -> a -> a) -> TexCoord1 a -> a
    foldl1 a -> a -> a
    _ (TexCoord1 a
    x) = a
    x

    instance Traversable TexCoord1 where
       traverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> TexCoord1 a -> f (TexCoord1 b)
    traverse a -> f b
    f (TexCoord1 a
    x) = (b -> TexCoord1 b) -> f (b -> TexCoord1 b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure b -> TexCoord1 b
    forall a. a -> TexCoord1 a
    TexCoord1 f (b -> TexCoord1 b) -> f b -> f (TexCoord1 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    x
       sequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    TexCoord1 (f a) -> f (TexCoord1 a)
    sequenceA (TexCoord1 f a
    x) =  (a -> TexCoord1 a) -> f (a -> TexCoord1 a)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure a -> TexCoord1 a
    forall a. a -> TexCoord1 a
    TexCoord1 f (a -> TexCoord1 a) -> f a -> f (TexCoord1 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    x
       mapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> TexCoord1 a -> m (TexCoord1 b)
    mapM a -> m b
    f (TexCoord1 a
    x) = (b -> TexCoord1 b) -> m (b -> TexCoord1 b)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return b -> TexCoord1 b
    forall a. a -> TexCoord1 a
    TexCoord1 m (b -> TexCoord1 b) -> m b -> m (TexCoord1 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    x
       sequence :: forall (m :: * -> *) a.
    Monad m =>
    TexCoord1 (m a) -> m (TexCoord1 a)
    sequence (TexCoord1 m a
    x) = (a -> TexCoord1 a) -> m (a -> TexCoord1 a)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return a -> TexCoord1 a
    forall a. a -> TexCoord1 a
    TexCoord1 m (a -> TexCoord1 a) -> m a -> m (TexCoord1 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    x

    instance Storable a => Storable (TexCoord1 a) where
       sizeOf :: TexCoord1 a -> Int
    sizeOf    ~(TexCoord1 a
    s) = a -> Int
    forall a. Storable a => a -> Int
    sizeOf a
    s
       alignment :: TexCoord1 a -> Int
    alignment ~(TexCoord1 a
    s) = a -> Int
    forall a. Storable a => a -> Int
    alignment a
    s
       peek :: Ptr (TexCoord1 a) -> IO (TexCoord1 a)
    peek = Ptr (TexCoord1 a) -> IO (TexCoord1 a)
    forall (t :: * -> *) a.
    (Applicative t, Traversable t, Storable a) =>
    Ptr (t a) -> IO (t a)
    peekApplicativeTraversable
       poke :: Ptr (TexCoord1 a) -> TexCoord1 a -> IO ()
    poke = Ptr (TexCoord1 a) -> TexCoord1 a -> IO ()
    forall (t :: * -> *) a.
    (Foldable t, Storable a) =>
    Ptr (t a) -> t a -> IO ()
    pokeFoldable

    --------------------------------------------------------------------------------

    -- | Texture coordinates with /r/=0 and /q/=1.
    data TexCoord2 a = TexCoord2 !a !a
       deriving (TexCoord2 a -> TexCoord2 a -> Bool
    (TexCoord2 a -> TexCoord2 a -> Bool)
    -> (TexCoord2 a -> TexCoord2 a -> Bool) -> Eq (TexCoord2 a)
    forall a. Eq a => TexCoord2 a -> TexCoord2 a -> Bool
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: forall a. Eq a => TexCoord2 a -> TexCoord2 a -> Bool
    == :: TexCoord2 a -> TexCoord2 a -> Bool
    $c/= :: forall a. Eq a => TexCoord2 a -> TexCoord2 a -> Bool
    /= :: TexCoord2 a -> TexCoord2 a -> Bool
    Eq, Eq (TexCoord2 a)
    Eq (TexCoord2 a) =>
    (TexCoord2 a -> TexCoord2 a -> Ordering)
    -> (TexCoord2 a -> TexCoord2 a -> Bool)
    -> (TexCoord2 a -> TexCoord2 a -> Bool)
    -> (TexCoord2 a -> TexCoord2 a -> Bool)
    -> (TexCoord2 a -> TexCoord2 a -> Bool)
    -> (TexCoord2 a -> TexCoord2 a -> TexCoord2 a)
    -> (TexCoord2 a -> TexCoord2 a -> TexCoord2 a)
    -> Ord (TexCoord2 a)
    TexCoord2 a -> TexCoord2 a -> Bool
    TexCoord2 a -> TexCoord2 a -> Ordering
    TexCoord2 a -> TexCoord2 a -> TexCoord2 a
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall a. Ord a => Eq (TexCoord2 a)
    forall a. Ord a => TexCoord2 a -> TexCoord2 a -> Bool
    forall a. Ord a => TexCoord2 a -> TexCoord2 a -> Ordering
    forall a. Ord a => TexCoord2 a -> TexCoord2 a -> TexCoord2 a
    $ccompare :: forall a. Ord a => TexCoord2 a -> TexCoord2 a -> Ordering
    compare :: TexCoord2 a -> TexCoord2 a -> Ordering
    $c< :: forall a. Ord a => TexCoord2 a -> TexCoord2 a -> Bool
    < :: TexCoord2 a -> TexCoord2 a -> Bool
    $c<= :: forall a. Ord a => TexCoord2 a -> TexCoord2 a -> Bool
    <= :: TexCoord2 a -> TexCoord2 a -> Bool
    $c> :: forall a. Ord a => TexCoord2 a -> TexCoord2 a -> Bool
    > :: TexCoord2 a -> TexCoord2 a -> Bool
    $c>= :: forall a. Ord a => TexCoord2 a -> TexCoord2 a -> Bool
    >= :: TexCoord2 a -> TexCoord2 a -> Bool
    $cmax :: forall a. Ord a => TexCoord2 a -> TexCoord2 a -> TexCoord2 a
    max :: TexCoord2 a -> TexCoord2 a -> TexCoord2 a
    $cmin :: forall a. Ord a => TexCoord2 a -> TexCoord2 a -> TexCoord2 a
    min :: TexCoord2 a -> TexCoord2 a -> TexCoord2 a
    Ord, Ord (TexCoord2 a)
    Ord (TexCoord2 a) =>
    ((TexCoord2 a, TexCoord2 a) -> [TexCoord2 a])
    -> ((TexCoord2 a, TexCoord2 a) -> TexCoord2 a -> Int)
    -> ((TexCoord2 a, TexCoord2 a) -> TexCoord2 a -> Int)
    -> ((TexCoord2 a, TexCoord2 a) -> TexCoord2 a -> Bool)
    -> ((TexCoord2 a, TexCoord2 a) -> Int)
    -> ((TexCoord2 a, TexCoord2 a) -> Int)
    -> Ix (TexCoord2 a)
    (TexCoord2 a, TexCoord2 a) -> Int
    (TexCoord2 a, TexCoord2 a) -> [TexCoord2 a]
    (TexCoord2 a, TexCoord2 a) -> TexCoord2 a -> Bool
    (TexCoord2 a, TexCoord2 a) -> TexCoord2 a -> Int
    forall a.
    Ord a =>
    ((a, a) -> [a])
    -> ((a, a) -> a -> Int)
    -> ((a, a) -> a -> Int)
    -> ((a, a) -> a -> Bool)
    -> ((a, a) -> Int)
    -> ((a, a) -> Int)
    -> Ix a
    forall a. Ix a => Ord (TexCoord2 a)
    forall a. Ix a => (TexCoord2 a, TexCoord2 a) -> Int
    forall a. Ix a => (TexCoord2 a, TexCoord2 a) -> [TexCoord2 a]
    forall a. Ix a => (TexCoord2 a, TexCoord2 a) -> TexCoord2 a -> Bool
    forall a. Ix a => (TexCoord2 a, TexCoord2 a) -> TexCoord2 a -> Int
    $crange :: forall a. Ix a => (TexCoord2 a, TexCoord2 a) -> [TexCoord2 a]
    range :: (TexCoord2 a, TexCoord2 a) -> [TexCoord2 a]
    $cindex :: forall a. Ix a => (TexCoord2 a, TexCoord2 a) -> TexCoord2 a -> Int
    index :: (TexCoord2 a, TexCoord2 a) -> TexCoord2 a -> Int
    $cunsafeIndex :: forall a. Ix a => (TexCoord2 a, TexCoord2 a) -> TexCoord2 a -> Int
    unsafeIndex :: (TexCoord2 a, TexCoord2 a) -> TexCoord2 a -> Int
    $cinRange :: forall a. Ix a => (TexCoord2 a, TexCoord2 a) -> TexCoord2 a -> Bool
    inRange :: (TexCoord2 a, TexCoord2 a) -> TexCoord2 a -> Bool
    $crangeSize :: forall a. Ix a => (TexCoord2 a, TexCoord2 a) -> Int
    rangeSize :: (TexCoord2 a, TexCoord2 a) -> Int
    $cunsafeRangeSize :: forall a. Ix a => (TexCoord2 a, TexCoord2 a) -> Int
    unsafeRangeSize :: (TexCoord2 a, TexCoord2 a) -> Int
    Ix, TexCoord2 a
    TexCoord2 a -> TexCoord2 a -> Bounded (TexCoord2 a)
    forall a. a -> a -> Bounded a
    forall a. Bounded a => TexCoord2 a
    $cminBound :: forall a. Bounded a => TexCoord2 a
    minBound :: TexCoord2 a
    $cmaxBound :: forall a. Bounded a => TexCoord2 a
    maxBound :: TexCoord2 a
    Bounded, Int -> TexCoord2 a -> ShowS
    [TexCoord2 a] -> ShowS
    TexCoord2 a -> String
    (Int -> TexCoord2 a -> ShowS)
    -> (TexCoord2 a -> String)
    -> ([TexCoord2 a] -> ShowS)
    -> Show (TexCoord2 a)
    forall a. Show a => Int -> TexCoord2 a -> ShowS
    forall a. Show a => [TexCoord2 a] -> ShowS
    forall a. Show a => TexCoord2 a -> String
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: forall a. Show a => Int -> TexCoord2 a -> ShowS
    showsPrec :: Int -> TexCoord2 a -> ShowS
    $cshow :: forall a. Show a => TexCoord2 a -> String
    show :: TexCoord2 a -> String
    $cshowList :: forall a. Show a => [TexCoord2 a] -> ShowS
    showList :: [TexCoord2 a] -> ShowS
    Show, ReadPrec [TexCoord2 a]
    ReadPrec (TexCoord2 a)
    Int -> ReadS (TexCoord2 a)
    ReadS [TexCoord2 a]
    (Int -> ReadS (TexCoord2 a))
    -> ReadS [TexCoord2 a]
    -> ReadPrec (TexCoord2 a)
    -> ReadPrec [TexCoord2 a]
    -> Read (TexCoord2 a)
    forall a. Read a => ReadPrec [TexCoord2 a]
    forall a. Read a => ReadPrec (TexCoord2 a)
    forall a. Read a => Int -> ReadS (TexCoord2 a)
    forall a. Read a => ReadS [TexCoord2 a]
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: forall a. Read a => Int -> ReadS (TexCoord2 a)
    readsPrec :: Int -> ReadS (TexCoord2 a)
    $creadList :: forall a. Read a => ReadS [TexCoord2 a]
    readList :: ReadS [TexCoord2 a]
    $creadPrec :: forall a. Read a => ReadPrec (TexCoord2 a)
    readPrec :: ReadPrec (TexCoord2 a)
    $creadListPrec :: forall a. Read a => ReadPrec [TexCoord2 a]
    readListPrec :: ReadPrec [TexCoord2 a]
    Read, Typeable)

    instance Functor TexCoord2 where
       fmap :: forall a b. (a -> b) -> TexCoord2 a -> TexCoord2 b
    fmap a -> b
    f (TexCoord2 a
    x a
    y) = b -> b -> TexCoord2 b
    forall a. a -> a -> TexCoord2 a
    TexCoord2 (a -> b
    f a
    x) (a -> b
    f a
    y)

    instance Applicative TexCoord2 where
       pure :: forall a. a -> TexCoord2 a
    pure a
    a = a -> a -> TexCoord2 a
    forall a. a -> a -> TexCoord2 a
    TexCoord2 a
    a a
    a
       TexCoord2 a -> b
    f a -> b
    g <*> :: forall a b. TexCoord2 (a -> b) -> TexCoord2 a -> TexCoord2 b
    <*> TexCoord2 a
    x a
    y = b -> b -> TexCoord2 b
    forall a. a -> a -> TexCoord2 a
    TexCoord2 (a -> b
    f a
    x) (a -> b
    g a
    y)

    instance Foldable TexCoord2 where
       foldr :: forall a b. (a -> b -> b) -> b -> TexCoord2 a -> b
    foldr a -> b -> b
    f b
    a (TexCoord2 a
    x a
    y) = a
    x `f ` (a
    y a -> b -> b
    `f` b
    a)
       foldl :: forall b a. (b -> a -> b) -> b -> TexCoord2 a -> b
    foldl b -> a -> b
    f b
    a (TexCoord2 a
    x a
    y) = (b
    a b -> a -> b
    `f` a
    x) b -> a -> b
    `f` a
    y
       foldr1 :: forall a. (a -> a -> a) -> TexCoord2 a -> a
    foldr1 a -> a -> a
    f (TexCoord2 a
    x a
    y) = a
    x a -> a -> a
    `f` a
    y
       foldl1 :: forall a. (a -> a -> a) -> TexCoord2 a -> a
    foldl1 a -> a -> a
    f (TexCoord2 a
    x a
    y) = a
    x a -> a -> a
    `f` a
    y

    instance Traversable TexCoord2 where
       traverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> TexCoord2 a -> f (TexCoord2 b)
    traverse a -> f b
    f (TexCoord2 a
    x a
    y) = (b -> b -> TexCoord2 b) -> f (b -> b -> TexCoord2 b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure b -> b -> TexCoord2 b
    forall a. a -> a -> TexCoord2 a
    TexCoord2 f (b -> b -> TexCoord2 b) -> f b -> f (b -> TexCoord2 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    x f (b -> TexCoord2 b) -> f b -> f (TexCoord2 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    y
       sequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    TexCoord2 (f a) -> f (TexCoord2 a)
    sequenceA (TexCoord2 f a
    x f a
    y) =  (a -> a -> TexCoord2 a) -> f (a -> a -> TexCoord2 a)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure a -> a -> TexCoord2 a
    forall a. a -> a -> TexCoord2 a
    TexCoord2 f (a -> a -> TexCoord2 a) -> f a -> f (a -> TexCoord2 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    x f (a -> TexCoord2 a) -> f a -> f (TexCoord2 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    y
       mapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> TexCoord2 a -> m (TexCoord2 b)
    mapM a -> m b
    f (TexCoord2 a
    x a
    y) = (b -> b -> TexCoord2 b) -> m (b -> b -> TexCoord2 b)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return b -> b -> TexCoord2 b
    forall a. a -> a -> TexCoord2 a
    TexCoord2 m (b -> b -> TexCoord2 b) -> m b -> m (b -> TexCoord2 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    x m (b -> TexCoord2 b) -> m b -> m (TexCoord2 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    y
       sequence :: forall (m :: * -> *) a.
    Monad m =>
    TexCoord2 (m a) -> m (TexCoord2 a)
    sequence (TexCoord2 m a
    x m a
    y) = (a -> a -> TexCoord2 a) -> m (a -> a -> TexCoord2 a)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return a -> a -> TexCoord2 a
    forall a. a -> a -> TexCoord2 a
    TexCoord2 m (a -> a -> TexCoord2 a) -> m a -> m (a -> TexCoord2 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    x m (a -> TexCoord2 a) -> m a -> m (TexCoord2 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    y

    instance Storable a => Storable (TexCoord2 a) where
       sizeOf :: TexCoord2 a -> Int
    sizeOf ~(TexCoord2 a
    x a
    _) = Int
    2 Int -> Int -> Int
    forall a. Num a => a -> a -> a
    * a -> Int
    forall a. Storable a => a -> Int
    sizeOf a
    x
       alignment :: TexCoord2 a -> Int
    alignment ~(TexCoord2 a
    x a
    _) = a -> Int
    forall a. Storable a => a -> Int
    alignment a
    x
       peek :: Ptr (TexCoord2 a) -> IO (TexCoord2 a)
    peek = Ptr (TexCoord2 a) -> IO (TexCoord2 a)
    forall (t :: * -> *) a.
    (Applicative t, Traversable t, Storable a) =>
    Ptr (t a) -> IO (t a)
    peekApplicativeTraversable
       poke :: Ptr (TexCoord2 a) -> TexCoord2 a -> IO ()
    poke = Ptr (TexCoord2 a) -> TexCoord2 a -> IO ()
    forall (t :: * -> *) a.
    (Foldable t, Storable a) =>
    Ptr (t a) -> t a -> IO ()
    pokeFoldable

    --------------------------------------------------------------------------------

    -- | Texture coordinates with /q/=1.
    data TexCoord3 a = TexCoord3 !a !a !a
       deriving (TexCoord3 a -> TexCoord3 a -> Bool
    (TexCoord3 a -> TexCoord3 a -> Bool)
    -> (TexCoord3 a -> TexCoord3 a -> Bool) -> Eq (TexCoord3 a)
    forall a. Eq a => TexCoord3 a -> TexCoord3 a -> Bool
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: forall a. Eq a => TexCoord3 a -> TexCoord3 a -> Bool
    == :: TexCoord3 a -> TexCoord3 a -> Bool
    $c/= :: forall a. Eq a => TexCoord3 a -> TexCoord3 a -> Bool
    /= :: TexCoord3 a -> TexCoord3 a -> Bool
    Eq, Eq (TexCoord3 a)
    Eq (TexCoord3 a) =>
    (TexCoord3 a -> TexCoord3 a -> Ordering)
    -> (TexCoord3 a -> TexCoord3 a -> Bool)
    -> (TexCoord3 a -> TexCoord3 a -> Bool)
    -> (TexCoord3 a -> TexCoord3 a -> Bool)
    -> (TexCoord3 a -> TexCoord3 a -> Bool)
    -> (TexCoord3 a -> TexCoord3 a -> TexCoord3 a)
    -> (TexCoord3 a -> TexCoord3 a -> TexCoord3 a)
    -> Ord (TexCoord3 a)
    TexCoord3 a -> TexCoord3 a -> Bool
    TexCoord3 a -> TexCoord3 a -> Ordering
    TexCoord3 a -> TexCoord3 a -> TexCoord3 a
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall a. Ord a => Eq (TexCoord3 a)
    forall a. Ord a => TexCoord3 a -> TexCoord3 a -> Bool
    forall a. Ord a => TexCoord3 a -> TexCoord3 a -> Ordering
    forall a. Ord a => TexCoord3 a -> TexCoord3 a -> TexCoord3 a
    $ccompare :: forall a. Ord a => TexCoord3 a -> TexCoord3 a -> Ordering
    compare :: TexCoord3 a -> TexCoord3 a -> Ordering
    $c< :: forall a. Ord a => TexCoord3 a -> TexCoord3 a -> Bool
    < :: TexCoord3 a -> TexCoord3 a -> Bool
    $c<= :: forall a. Ord a => TexCoord3 a -> TexCoord3 a -> Bool
    <= :: TexCoord3 a -> TexCoord3 a -> Bool
    $c> :: forall a. Ord a => TexCoord3 a -> TexCoord3 a -> Bool
    > :: TexCoord3 a -> TexCoord3 a -> Bool
    $c>= :: forall a. Ord a => TexCoord3 a -> TexCoord3 a -> Bool
    >= :: TexCoord3 a -> TexCoord3 a -> Bool
    $cmax :: forall a. Ord a => TexCoord3 a -> TexCoord3 a -> TexCoord3 a
    max :: TexCoord3 a -> TexCoord3 a -> TexCoord3 a
    $cmin :: forall a. Ord a => TexCoord3 a -> TexCoord3 a -> TexCoord3 a
    min :: TexCoord3 a -> TexCoord3 a -> TexCoord3 a
    Ord, Ord (TexCoord3 a)
    Ord (TexCoord3 a) =>
    ((TexCoord3 a, TexCoord3 a) -> [TexCoord3 a])
    -> ((TexCoord3 a, TexCoord3 a) -> TexCoord3 a -> Int)
    -> ((TexCoord3 a, TexCoord3 a) -> TexCoord3 a -> Int)
    -> ((TexCoord3 a, TexCoord3 a) -> TexCoord3 a -> Bool)
    -> ((TexCoord3 a, TexCoord3 a) -> Int)
    -> ((TexCoord3 a, TexCoord3 a) -> Int)
    -> Ix (TexCoord3 a)
    (TexCoord3 a, TexCoord3 a) -> Int
    (TexCoord3 a, TexCoord3 a) -> [TexCoord3 a]
    (TexCoord3 a, TexCoord3 a) -> TexCoord3 a -> Bool
    (TexCoord3 a, TexCoord3 a) -> TexCoord3 a -> Int
    forall a.
    Ord a =>
    ((a, a) -> [a])
    -> ((a, a) -> a -> Int)
    -> ((a, a) -> a -> Int)
    -> ((a, a) -> a -> Bool)
    -> ((a, a) -> Int)
    -> ((a, a) -> Int)
    -> Ix a
    forall a. Ix a => Ord (TexCoord3 a)
    forall a. Ix a => (TexCoord3 a, TexCoord3 a) -> Int
    forall a. Ix a => (TexCoord3 a, TexCoord3 a) -> [TexCoord3 a]
    forall a. Ix a => (TexCoord3 a, TexCoord3 a) -> TexCoord3 a -> Bool
    forall a. Ix a => (TexCoord3 a, TexCoord3 a) -> TexCoord3 a -> Int
    $crange :: forall a. Ix a => (TexCoord3 a, TexCoord3 a) -> [TexCoord3 a]
    range :: (TexCoord3 a, TexCoord3 a) -> [TexCoord3 a]
    $cindex :: forall a. Ix a => (TexCoord3 a, TexCoord3 a) -> TexCoord3 a -> Int
    index :: (TexCoord3 a, TexCoord3 a) -> TexCoord3 a -> Int
    $cunsafeIndex :: forall a. Ix a => (TexCoord3 a, TexCoord3 a) -> TexCoord3 a -> Int
    unsafeIndex :: (TexCoord3 a, TexCoord3 a) -> TexCoord3 a -> Int
    $cinRange :: forall a. Ix a => (TexCoord3 a, TexCoord3 a) -> TexCoord3 a -> Bool
    inRange :: (TexCoord3 a, TexCoord3 a) -> TexCoord3 a -> Bool
    $crangeSize :: forall a. Ix a => (TexCoord3 a, TexCoord3 a) -> Int
    rangeSize :: (TexCoord3 a, TexCoord3 a) -> Int
    $cunsafeRangeSize :: forall a. Ix a => (TexCoord3 a, TexCoord3 a) -> Int
    unsafeRangeSize :: (TexCoord3 a, TexCoord3 a) -> Int
    Ix, TexCoord3 a
    TexCoord3 a -> TexCoord3 a -> Bounded (TexCoord3 a)
    forall a. a -> a -> Bounded a
    forall a. Bounded a => TexCoord3 a
    $cminBound :: forall a. Bounded a => TexCoord3 a
    minBound :: TexCoord3 a
    $cmaxBound :: forall a. Bounded a => TexCoord3 a
    maxBound :: TexCoord3 a
    Bounded, Int -> TexCoord3 a -> ShowS
    [TexCoord3 a] -> ShowS
    TexCoord3 a -> String
    (Int -> TexCoord3 a -> ShowS)
    -> (TexCoord3 a -> String)
    -> ([TexCoord3 a] -> ShowS)
    -> Show (TexCoord3 a)
    forall a. Show a => Int -> TexCoord3 a -> ShowS
    forall a. Show a => [TexCoord3 a] -> ShowS
    forall a. Show a => TexCoord3 a -> String
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: forall a. Show a => Int -> TexCoord3 a -> ShowS
    showsPrec :: Int -> TexCoord3 a -> ShowS
    $cshow :: forall a. Show a => TexCoord3 a -> String
    show :: TexCoord3 a -> String
    $cshowList :: forall a. Show a => [TexCoord3 a] -> ShowS
    showList :: [TexCoord3 a] -> ShowS
    Show, ReadPrec [TexCoord3 a]
    ReadPrec (TexCoord3 a)
    Int -> ReadS (TexCoord3 a)
    ReadS [TexCoord3 a]
    (Int -> ReadS (TexCoord3 a))
    -> ReadS [TexCoord3 a]
    -> ReadPrec (TexCoord3 a)
    -> ReadPrec [TexCoord3 a]
    -> Read (TexCoord3 a)
    forall a. Read a => ReadPrec [TexCoord3 a]
    forall a. Read a => ReadPrec (TexCoord3 a)
    forall a. Read a => Int -> ReadS (TexCoord3 a)
    forall a. Read a => ReadS [TexCoord3 a]
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: forall a. Read a => Int -> ReadS (TexCoord3 a)
    readsPrec :: Int -> ReadS (TexCoord3 a)
    $creadList :: forall a. Read a => ReadS [TexCoord3 a]
    readList :: ReadS [TexCoord3 a]
    $creadPrec :: forall a. Read a => ReadPrec (TexCoord3 a)
    readPrec :: ReadPrec (TexCoord3 a)
    $creadListPrec :: forall a. Read a => ReadPrec [TexCoord3 a]
    readListPrec :: ReadPrec [TexCoord3 a]
    Read, Typeable)

    instance Functor TexCoord3 where
       fmap :: forall a b. (a -> b) -> TexCoord3 a -> TexCoord3 b
    fmap a -> b
    f (TexCoord3 a
    x a
    y a
    z) = b -> b -> b -> TexCoord3 b
    forall a. a -> a -> a -> TexCoord3 a
    TexCoord3 (a -> b
    f a
    x) (a -> b
    f a
    y) (a -> b
    f a
    z)

    instance Applicative TexCoord3 where
       pure :: forall a. a -> TexCoord3 a
    pure a
    a = a -> a -> a -> TexCoord3 a
    forall a. a -> a -> a -> TexCoord3 a
    TexCoord3 a
    a a
    a a
    a
       TexCoord3 a -> b
    f a -> b
    g a -> b
    h <*> :: forall a b. TexCoord3 (a -> b) -> TexCoord3 a -> TexCoord3 b
    <*> TexCoord3 a
    x a
    y a
    z = b -> b -> b -> TexCoord3 b
    forall a. a -> a -> a -> TexCoord3 a
    TexCoord3 (a -> b
    f a
    x) (a -> b
    g a
    y) (a -> b
    h a
    z)

    instance Foldable TexCoord3 where
       foldr :: forall a b. (a -> b -> b) -> b -> TexCoord3 a -> b
    foldr a -> b -> b
    f b
    a (TexCoord3 a
    x a
    y a
    z) = a
    x `f ` (a
    y a -> b -> b
    `f` (a
    z a -> b -> b
    `f` b
    a))
       foldl :: forall b a. (b -> a -> b) -> b -> TexCoord3 a -> b
    foldl b -> a -> b
    f b
    a (TexCoord3 a
    x a
    y a
    z) = ((b
    a b -> a -> b
    `f` a
    x) b -> a -> b
    `f` a
    y) b -> a -> b
    `f` a
    z
       foldr1 :: forall a. (a -> a -> a) -> TexCoord3 a -> a
    foldr1 a -> a -> a
    f (TexCoord3 a
    x a
    y a
    z) = a
    x a -> a -> a
    `f` (a
    y a -> a -> a
    `f` a
    z)
       foldl1 :: forall a. (a -> a -> a) -> TexCoord3 a -> a
    foldl1 a -> a -> a
    f (TexCoord3 a
    x a
    y a
    z) = (a
    x a -> a -> a
    `f` a
    y) a -> a -> a
    `f` a
    z

    instance Traversable TexCoord3 where
       traverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> TexCoord3 a -> f (TexCoord3 b)
    traverse a -> f b
    f (TexCoord3 a
    x a
    y a
    z) = (b -> b -> b -> TexCoord3 b) -> f (b -> b -> b -> TexCoord3 b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure b -> b -> b -> TexCoord3 b
    forall a. a -> a -> a -> TexCoord3 a
    TexCoord3 f (b -> b -> b -> TexCoord3 b) -> f b -> f (b -> b -> TexCoord3 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    x f (b -> b -> TexCoord3 b) -> f b -> f (b -> TexCoord3 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    y f (b -> TexCoord3 b) -> f b -> f (TexCoord3 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    z
       sequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    TexCoord3 (f a) -> f (TexCoord3 a)
    sequenceA (TexCoord3 f a
    x f a
    y f a
    z) =  (a -> a -> a -> TexCoord3 a) -> f (a -> a -> a -> TexCoord3 a)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure a -> a -> a -> TexCoord3 a
    forall a. a -> a -> a -> TexCoord3 a
    TexCoord3 f (a -> a -> a -> TexCoord3 a) -> f a -> f (a -> a -> TexCoord3 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    x f (a -> a -> TexCoord3 a) -> f a -> f (a -> TexCoord3 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    y f (a -> TexCoord3 a) -> f a -> f (TexCoord3 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    z
       mapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> TexCoord3 a -> m (TexCoord3 b)
    mapM a -> m b
    f (TexCoord3 a
    x a
    y a
    z) = (b -> b -> b -> TexCoord3 b) -> m (b -> b -> b -> TexCoord3 b)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return b -> b -> b -> TexCoord3 b
    forall a. a -> a -> a -> TexCoord3 a
    TexCoord3 m (b -> b -> b -> TexCoord3 b) -> m b -> m (b -> b -> TexCoord3 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    x m (b -> b -> TexCoord3 b) -> m b -> m (b -> TexCoord3 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    y m (b -> TexCoord3 b) -> m b -> m (TexCoord3 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    z
       sequence :: forall (m :: * -> *) a.
    Monad m =>
    TexCoord3 (m a) -> m (TexCoord3 a)
    sequence (TexCoord3 m a
    x m a
    y m a
    z) = (a -> a -> a -> TexCoord3 a) -> m (a -> a -> a -> TexCoord3 a)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return a -> a -> a -> TexCoord3 a
    forall a. a -> a -> a -> TexCoord3 a
    TexCoord3 m (a -> a -> a -> TexCoord3 a) -> m a -> m (a -> a -> TexCoord3 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    x m (a -> a -> TexCoord3 a) -> m a -> m (a -> TexCoord3 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    y m (a -> TexCoord3 a) -> m a -> m (TexCoord3 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    z

    instance Storable a => Storable (TexCoord3 a) where
       sizeOf :: TexCoord3 a -> Int
    sizeOf ~(TexCoord3 a
    x a
    _ a
    _) = Int
    3 Int -> Int -> Int
    forall a. Num a => a -> a -> a
    * a -> Int
    forall a. Storable a => a -> Int
    sizeOf a
    x
       alignment :: TexCoord3 a -> Int
    alignment ~(TexCoord3 a
    x a
    _ a
    _) = a -> Int
    forall a. Storable a => a -> Int
    alignment a
    x
       peek :: Ptr (TexCoord3 a) -> IO (TexCoord3 a)
    peek = Ptr (TexCoord3 a) -> IO (TexCoord3 a)
    forall (t :: * -> *) a.
    (Applicative t, Traversable t, Storable a) =>
    Ptr (t a) -> IO (t a)
    peekApplicativeTraversable
       poke :: Ptr (TexCoord3 a) -> TexCoord3 a -> IO ()
    poke = Ptr (TexCoord3 a) -> TexCoord3 a -> IO ()
    forall (t :: * -> *) a.
    (Foldable t, Storable a) =>
    Ptr (t a) -> t a -> IO ()
    pokeFoldable

    --------------------------------------------------------------------------------

    -- | Fully-fledged four-dimensional texture coordinates.
    data TexCoord4 a = TexCoord4 !a !a !a !a
       deriving (TexCoord4 a -> TexCoord4 a -> Bool
    (TexCoord4 a -> TexCoord4 a -> Bool)
    -> (TexCoord4 a -> TexCoord4 a -> Bool) -> Eq (TexCoord4 a)
    forall a. Eq a => TexCoord4 a -> TexCoord4 a -> Bool
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: forall a. Eq a => TexCoord4 a -> TexCoord4 a -> Bool
    == :: TexCoord4 a -> TexCoord4 a -> Bool
    $c/= :: forall a. Eq a => TexCoord4 a -> TexCoord4 a -> Bool
    /= :: TexCoord4 a -> TexCoord4 a -> Bool
    Eq, Eq (TexCoord4 a)
    Eq (TexCoord4 a) =>
    (TexCoord4 a -> TexCoord4 a -> Ordering)
    -> (TexCoord4 a -> TexCoord4 a -> Bool)
    -> (TexCoord4 a -> TexCoord4 a -> Bool)
    -> (TexCoord4 a -> TexCoord4 a -> Bool)
    -> (TexCoord4 a -> TexCoord4 a -> Bool)
    -> (TexCoord4 a -> TexCoord4 a -> TexCoord4 a)
    -> (TexCoord4 a -> TexCoord4 a -> TexCoord4 a)
    -> Ord (TexCoord4 a)
    TexCoord4 a -> TexCoord4 a -> Bool
    TexCoord4 a -> TexCoord4 a -> Ordering
    TexCoord4 a -> TexCoord4 a -> TexCoord4 a
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall a. Ord a => Eq (TexCoord4 a)
    forall a. Ord a => TexCoord4 a -> TexCoord4 a -> Bool
    forall a. Ord a => TexCoord4 a -> TexCoord4 a -> Ordering
    forall a. Ord a => TexCoord4 a -> TexCoord4 a -> TexCoord4 a
    $ccompare :: forall a. Ord a => TexCoord4 a -> TexCoord4 a -> Ordering
    compare :: TexCoord4 a -> TexCoord4 a -> Ordering
    $c< :: forall a. Ord a => TexCoord4 a -> TexCoord4 a -> Bool
    < :: TexCoord4 a -> TexCoord4 a -> Bool
    $c<= :: forall a. Ord a => TexCoord4 a -> TexCoord4 a -> Bool
    <= :: TexCoord4 a -> TexCoord4 a -> Bool
    $c> :: forall a. Ord a => TexCoord4 a -> TexCoord4 a -> Bool
    > :: TexCoord4 a -> TexCoord4 a -> Bool
    $c>= :: forall a. Ord a => TexCoord4 a -> TexCoord4 a -> Bool
    >= :: TexCoord4 a -> TexCoord4 a -> Bool
    $cmax :: forall a. Ord a => TexCoord4 a -> TexCoord4 a -> TexCoord4 a
    max :: TexCoord4 a -> TexCoord4 a -> TexCoord4 a
    $cmin :: forall a. Ord a => TexCoord4 a -> TexCoord4 a -> TexCoord4 a
    min :: TexCoord4 a -> TexCoord4 a -> TexCoord4 a
    Ord, Ord (TexCoord4 a)
    Ord (TexCoord4 a) =>
    ((TexCoord4 a, TexCoord4 a) -> [TexCoord4 a])
    -> ((TexCoord4 a, TexCoord4 a) -> TexCoord4 a -> Int)
    -> ((TexCoord4 a, TexCoord4 a) -> TexCoord4 a -> Int)
    -> ((TexCoord4 a, TexCoord4 a) -> TexCoord4 a -> Bool)
    -> ((TexCoord4 a, TexCoord4 a) -> Int)
    -> ((TexCoord4 a, TexCoord4 a) -> Int)
    -> Ix (TexCoord4 a)
    (TexCoord4 a, TexCoord4 a) -> Int
    (TexCoord4 a, TexCoord4 a) -> [TexCoord4 a]
    (TexCoord4 a, TexCoord4 a) -> TexCoord4 a -> Bool
    (TexCoord4 a, TexCoord4 a) -> TexCoord4 a -> Int
    forall a.
    Ord a =>
    ((a, a) -> [a])
    -> ((a, a) -> a -> Int)
    -> ((a, a) -> a -> Int)
    -> ((a, a) -> a -> Bool)
    -> ((a, a) -> Int)
    -> ((a, a) -> Int)
    -> Ix a
    forall a. Ix a => Ord (TexCoord4 a)
    forall a. Ix a => (TexCoord4 a, TexCoord4 a) -> Int
    forall a. Ix a => (TexCoord4 a, TexCoord4 a) -> [TexCoord4 a]
    forall a. Ix a => (TexCoord4 a, TexCoord4 a) -> TexCoord4 a -> Bool
    forall a. Ix a => (TexCoord4 a, TexCoord4 a) -> TexCoord4 a -> Int
    $crange :: forall a. Ix a => (TexCoord4 a, TexCoord4 a) -> [TexCoord4 a]
    range :: (TexCoord4 a, TexCoord4 a) -> [TexCoord4 a]
    $cindex :: forall a. Ix a => (TexCoord4 a, TexCoord4 a) -> TexCoord4 a -> Int
    index :: (TexCoord4 a, TexCoord4 a) -> TexCoord4 a -> Int
    $cunsafeIndex :: forall a. Ix a => (TexCoord4 a, TexCoord4 a) -> TexCoord4 a -> Int
    unsafeIndex :: (TexCoord4 a, TexCoord4 a) -> TexCoord4 a -> Int
    $cinRange :: forall a. Ix a => (TexCoord4 a, TexCoord4 a) -> TexCoord4 a -> Bool
    inRange :: (TexCoord4 a, TexCoord4 a) -> TexCoord4 a -> Bool
    $crangeSize :: forall a. Ix a => (TexCoord4 a, TexCoord4 a) -> Int
    rangeSize :: (TexCoord4 a, TexCoord4 a) -> Int
    $cunsafeRangeSize :: forall a. Ix a => (TexCoord4 a, TexCoord4 a) -> Int
    unsafeRangeSize :: (TexCoord4 a, TexCoord4 a) -> Int
    Ix, TexCoord4 a
    TexCoord4 a -> TexCoord4 a -> Bounded (TexCoord4 a)
    forall a. a -> a -> Bounded a
    forall a. Bounded a => TexCoord4 a
    $cminBound :: forall a. Bounded a => TexCoord4 a
    minBound :: TexCoord4 a
    $cmaxBound :: forall a. Bounded a => TexCoord4 a
    maxBound :: TexCoord4 a
    Bounded, Int -> TexCoord4 a -> ShowS
    [TexCoord4 a] -> ShowS
    TexCoord4 a -> String
    (Int -> TexCoord4 a -> ShowS)
    -> (TexCoord4 a -> String)
    -> ([TexCoord4 a] -> ShowS)
    -> Show (TexCoord4 a)
    forall a. Show a => Int -> TexCoord4 a -> ShowS
    forall a. Show a => [TexCoord4 a] -> ShowS
    forall a. Show a => TexCoord4 a -> String
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: forall a. Show a => Int -> TexCoord4 a -> ShowS
    showsPrec :: Int -> TexCoord4 a -> ShowS
    $cshow :: forall a. Show a => TexCoord4 a -> String
    show :: TexCoord4 a -> String
    $cshowList :: forall a. Show a => [TexCoord4 a] -> ShowS
    showList :: [TexCoord4 a] -> ShowS
    Show, ReadPrec [TexCoord4 a]
    ReadPrec (TexCoord4 a)
    Int -> ReadS (TexCoord4 a)
    ReadS [TexCoord4 a]
    (Int -> ReadS (TexCoord4 a))
    -> ReadS [TexCoord4 a]
    -> ReadPrec (TexCoord4 a)
    -> ReadPrec [TexCoord4 a]
    -> Read (TexCoord4 a)
    forall a. Read a => ReadPrec [TexCoord4 a]
    forall a. Read a => ReadPrec (TexCoord4 a)
    forall a. Read a => Int -> ReadS (TexCoord4 a)
    forall a. Read a => ReadS [TexCoord4 a]
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: forall a. Read a => Int -> ReadS (TexCoord4 a)
    readsPrec :: Int -> ReadS (TexCoord4 a)
    $creadList :: forall a. Read a => ReadS [TexCoord4 a]
    readList :: ReadS [TexCoord4 a]
    $creadPrec :: forall a. Read a => ReadPrec (TexCoord4 a)
    readPrec :: ReadPrec (TexCoord4 a)
    $creadListPrec :: forall a. Read a => ReadPrec [TexCoord4 a]
    readListPrec :: ReadPrec [TexCoord4 a]
    Read, Typeable)

    instance Functor TexCoord4 where
       fmap :: forall a b. (a -> b) -> TexCoord4 a -> TexCoord4 b
    fmap a -> b
    f (TexCoord4 a
    x a
    y a
    z a
    w) = b -> b -> b -> b -> TexCoord4 b
    forall a. a -> a -> a -> a -> TexCoord4 a
    TexCoord4 (a -> b
    f a
    x) (a -> b
    f a
    y) (a -> b
    f a
    z) (a -> b
    f a
    w)

    instance Applicative TexCoord4 where
       pure :: forall a. a -> TexCoord4 a
    pure a
    a = a -> a -> a -> a -> TexCoord4 a
    forall a. a -> a -> a -> a -> TexCoord4 a
    TexCoord4 a
    a a
    a a
    a a
    a
       TexCoord4 a -> b
    f a -> b
    g a -> b
    h a -> b
    i <*> :: forall a b. TexCoord4 (a -> b) -> TexCoord4 a -> TexCoord4 b
    <*> TexCoord4 a
    x a
    y a
    z a
    w = b -> b -> b -> b -> TexCoord4 b
    forall a. a -> a -> a -> a -> TexCoord4 a
    TexCoord4 (a -> b
    f a
    x) (a -> b
    g a
    y) (a -> b
    h a
    z) (a -> b
    i a
    w)

    instance Foldable TexCoord4 where
       foldr :: forall a b. (a -> b -> b) -> b -> TexCoord4 a -> b
    foldr a -> b -> b
    f b
    a (TexCoord4 a
    x a
    y a
    z a
    w) = a
    x `f ` (a
    y a -> b -> b
    `f` (a
    z a -> b -> b
    `f` (a
    w a -> b -> b
    `f` b
    a)))
       foldl :: forall b a. (b -> a -> b) -> b -> TexCoord4 a -> b
    foldl b -> a -> b
    f b
    a (TexCoord4 a
    x a
    y a
    z a
    w) = (((b
    a b -> a -> b
    `f` a
    x) b -> a -> b
    `f` a
    y) b -> a -> b
    `f` a
    z) b -> a -> b
    `f` a
    w
       foldr1 :: forall a. (a -> a -> a) -> TexCoord4 a -> a
    foldr1 a -> a -> a
    f (TexCoord4 a
    x a
    y a
    z a
    w) = a
    x a -> a -> a
    `f` (a
    y a -> a -> a
    `f` (a
    z a -> a -> a
    `f` a
    w))
       foldl1 :: forall a. (a -> a -> a) -> TexCoord4 a -> a
    foldl1 a -> a -> a
    f (TexCoord4 a
    x a
    y a
    z a
    w) = ((a
    x a -> a -> a
    `f` a
    y) a -> a -> a
    `f` a
    z) a -> a -> a
    `f` a
    w

    instance Traversable TexCoord4 where
       traverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> TexCoord4 a -> f (TexCoord4 b)
    traverse a -> f b
    f (TexCoord4 a
    x a
    y a
    z a
    w) = (b -> b -> b -> b -> TexCoord4 b)
    -> f (b -> b -> b -> b -> TexCoord4 b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure b -> b -> b -> b -> TexCoord4 b
    forall a. a -> a -> a -> a -> TexCoord4 a
    TexCoord4 f (b -> b -> b -> b -> TexCoord4 b)
    -> f b -> f (b -> b -> b -> TexCoord4 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    x f (b -> b -> b -> TexCoord4 b) -> f b -> f (b -> b -> TexCoord4 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    y f (b -> b -> TexCoord4 b) -> f b -> f (b -> TexCoord4 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    z f (b -> TexCoord4 b) -> f b -> f (TexCoord4 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    w
       sequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    TexCoord4 (f a) -> f (TexCoord4 a)
    sequenceA (TexCoord4 f a
    x f a
    y f a
    z f a
    w) =  (a -> a -> a -> a -> TexCoord4 a)
    -> f (a -> a -> a -> a -> TexCoord4 a)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure a -> a -> a -> a -> TexCoord4 a
    forall a. a -> a -> a -> a -> TexCoord4 a
    TexCoord4 f (a -> a -> a -> a -> TexCoord4 a)
    -> f a -> f (a -> a -> a -> TexCoord4 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    x f (a -> a -> a -> TexCoord4 a) -> f a -> f (a -> a -> TexCoord4 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    y f (a -> a -> TexCoord4 a) -> f a -> f (a -> TexCoord4 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    z f (a -> TexCoord4 a) -> f a -> f (TexCoord4 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    w
       mapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> TexCoord4 a -> m (TexCoord4 b)
    mapM a -> m b
    f (TexCoord4 a
    x a
    y a
    z a
    w) = (b -> b -> b -> b -> TexCoord4 b)
    -> m (b -> b -> b -> b -> TexCoord4 b)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return b -> b -> b -> b -> TexCoord4 b
    forall a. a -> a -> a -> a -> TexCoord4 a
    TexCoord4 m (b -> b -> b -> b -> TexCoord4 b)
    -> m b -> m (b -> b -> b -> TexCoord4 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    x m (b -> b -> b -> TexCoord4 b) -> m b -> m (b -> b -> TexCoord4 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    y m (b -> b -> TexCoord4 b) -> m b -> m (b -> TexCoord4 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    z m (b -> TexCoord4 b) -> m b -> m (TexCoord4 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    w
       sequence :: forall (m :: * -> *) a.
    Monad m =>
    TexCoord4 (m a) -> m (TexCoord4 a)
    sequence (TexCoord4 m a
    x m a
    y m a
    z m a
    w) = (a -> a -> a -> a -> TexCoord4 a)
    -> m (a -> a -> a -> a -> TexCoord4 a)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return a -> a -> a -> a -> TexCoord4 a
    forall a. a -> a -> a -> a -> TexCoord4 a
    TexCoord4 m (a -> a -> a -> a -> TexCoord4 a)
    -> m a -> m (a -> a -> a -> TexCoord4 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    x m (a -> a -> a -> TexCoord4 a) -> m a -> m (a -> a -> TexCoord4 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    y m (a -> a -> TexCoord4 a) -> m a -> m (a -> TexCoord4 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    z m (a -> TexCoord4 a) -> m a -> m (TexCoord4 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    w

    instance Storable a => Storable (TexCoord4 a) where
       sizeOf :: TexCoord4 a -> Int
    sizeOf ~(TexCoord4 a
    x a
    _ a
    _ a
    _) = Int
    4 Int -> Int -> Int
    forall a. Num a => a -> a -> a
    * a -> Int
    forall a. Storable a => a -> Int
    sizeOf a
    x
       alignment :: TexCoord4 a -> Int
    alignment ~(TexCoord4 a
    x a
    _ a
    _ a
    _) = a -> Int
    forall a. Storable a => a -> Int
    alignment a
    x
       peek :: Ptr (TexCoord4 a) -> IO (TexCoord4 a)
    peek = Ptr (TexCoord4 a) -> IO (TexCoord4 a)
    forall (t :: * -> *) a.
    (Applicative t, Traversable t, Storable a) =>
    Ptr (t a) -> IO (t a)
    peekApplicativeTraversable
       poke :: Ptr (TexCoord4 a) -> TexCoord4 a -> IO ()
    poke = Ptr (TexCoord4 a) -> TexCoord4 a -> IO ()
    forall (t :: * -> *) a.
    (Foldable t, Storable a) =>
    Ptr (t a) -> t a -> IO ()
    pokeFoldable

    --------------------------------------------------------------------------------

    -- A three-dimensional normal.
    data Normal3 a = Normal3 !a !a !a
       deriving (Normal3 a -> Normal3 a -> Bool
    (Normal3 a -> Normal3 a -> Bool)
    -> (Normal3 a -> Normal3 a -> Bool) -> Eq (Normal3 a)
    forall a. Eq a => Normal3 a -> Normal3 a -> Bool
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: forall a. Eq a => Normal3 a -> Normal3 a -> Bool
    == :: Normal3 a -> Normal3 a -> Bool
    $c/= :: forall a. Eq a => Normal3 a -> Normal3 a -> Bool
    /= :: Normal3 a -> Normal3 a -> Bool
    Eq, Eq (Normal3 a)
    Eq (Normal3 a) =>
    (Normal3 a -> Normal3 a -> Ordering)
    -> (Normal3 a -> Normal3 a -> Bool)
    -> (Normal3 a -> Normal3 a -> Bool)
    -> (Normal3 a -> Normal3 a -> Bool)
    -> (Normal3 a -> Normal3 a -> Bool)
    -> (Normal3 a -> Normal3 a -> Normal3 a)
    -> (Normal3 a -> Normal3 a -> Normal3 a)
    -> Ord (Normal3 a)
    Normal3 a -> Normal3 a -> Bool
    Normal3 a -> Normal3 a -> Ordering
    Normal3 a -> Normal3 a -> Normal3 a
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall a. Ord a => Eq (Normal3 a)
    forall a. Ord a => Normal3 a -> Normal3 a -> Bool
    forall a. Ord a => Normal3 a -> Normal3 a -> Ordering
    forall a. Ord a => Normal3 a -> Normal3 a -> Normal3 a
    $ccompare :: forall a. Ord a => Normal3 a -> Normal3 a -> Ordering
    compare :: Normal3 a -> Normal3 a -> Ordering
    $c< :: forall a. Ord a => Normal3 a -> Normal3 a -> Bool
    < :: Normal3 a -> Normal3 a -> Bool
    $c<= :: forall a. Ord a => Normal3 a -> Normal3 a -> Bool
    <= :: Normal3 a -> Normal3 a -> Bool
    $c> :: forall a. Ord a => Normal3 a -> Normal3 a -> Bool
    > :: Normal3 a -> Normal3 a -> Bool
    $c>= :: forall a. Ord a => Normal3 a -> Normal3 a -> Bool
    >= :: Normal3 a -> Normal3 a -> Bool
    $cmax :: forall a. Ord a => Normal3 a -> Normal3 a -> Normal3 a
    max :: Normal3 a -> Normal3 a -> Normal3 a
    $cmin :: forall a. Ord a => Normal3 a -> Normal3 a -> Normal3 a
    min :: Normal3 a -> Normal3 a -> Normal3 a
    Ord, Ord (Normal3 a)
    Ord (Normal3 a) =>
    ((Normal3 a, Normal3 a) -> [Normal3 a])
    -> ((Normal3 a, Normal3 a) -> Normal3 a -> Int)
    -> ((Normal3 a, Normal3 a) -> Normal3 a -> Int)
    -> ((Normal3 a, Normal3 a) -> Normal3 a -> Bool)
    -> ((Normal3 a, Normal3 a) -> Int)
    -> ((Normal3 a, Normal3 a) -> Int)
    -> Ix (Normal3 a)
    (Normal3 a, Normal3 a) -> Int
    (Normal3 a, Normal3 a) -> [Normal3 a]
    (Normal3 a, Normal3 a) -> Normal3 a -> Bool
    (Normal3 a, Normal3 a) -> Normal3 a -> Int
    forall a.
    Ord a =>
    ((a, a) -> [a])
    -> ((a, a) -> a -> Int)
    -> ((a, a) -> a -> Int)
    -> ((a, a) -> a -> Bool)
    -> ((a, a) -> Int)
    -> ((a, a) -> Int)
    -> Ix a
    forall a. Ix a => Ord (Normal3 a)
    forall a. Ix a => (Normal3 a, Normal3 a) -> Int
    forall a. Ix a => (Normal3 a, Normal3 a) -> [Normal3 a]
    forall a. Ix a => (Normal3 a, Normal3 a) -> Normal3 a -> Bool
    forall a. Ix a => (Normal3 a, Normal3 a) -> Normal3 a -> Int
    $crange :: forall a. Ix a => (Normal3 a, Normal3 a) -> [Normal3 a]
    range :: (Normal3 a, Normal3 a) -> [Normal3 a]
    $cindex :: forall a. Ix a => (Normal3 a, Normal3 a) -> Normal3 a -> Int
    index :: (Normal3 a, Normal3 a) -> Normal3 a -> Int
    $cunsafeIndex :: forall a. Ix a => (Normal3 a, Normal3 a) -> Normal3 a -> Int
    unsafeIndex :: (Normal3 a, Normal3 a) -> Normal3 a -> Int
    $cinRange :: forall a. Ix a => (Normal3 a, Normal3 a) -> Normal3 a -> Bool
    inRange :: (Normal3 a, Normal3 a) -> Normal3 a -> Bool
    $crangeSize :: forall a. Ix a => (Normal3 a, Normal3 a) -> Int
    rangeSize :: (Normal3 a, Normal3 a) -> Int
    $cunsafeRangeSize :: forall a. Ix a => (Normal3 a, Normal3 a) -> Int
    unsafeRangeSize :: (Normal3 a, Normal3 a) -> Int
    Ix, Normal3 a
    Normal3 a -> Normal3 a -> Bounded (Normal3 a)
    forall a. a -> a -> Bounded a
    forall a. Bounded a => Normal3 a
    $cminBound :: forall a. Bounded a => Normal3 a
    minBound :: Normal3 a
    $cmaxBound :: forall a. Bounded a => Normal3 a
    maxBound :: Normal3 a
    Bounded, Int -> Normal3 a -> ShowS
    [Normal3 a] -> ShowS
    Normal3 a -> String
    (Int -> Normal3 a -> ShowS)
    -> (Normal3 a -> String)
    -> ([Normal3 a] -> ShowS)
    -> Show (Normal3 a)
    forall a. Show a => Int -> Normal3 a -> ShowS
    forall a. Show a => [Normal3 a] -> ShowS
    forall a. Show a => Normal3 a -> String
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: forall a. Show a => Int -> Normal3 a -> ShowS
    showsPrec :: Int -> Normal3 a -> ShowS
    $cshow :: forall a. Show a => Normal3 a -> String
    show :: Normal3 a -> String
    $cshowList :: forall a. Show a => [Normal3 a] -> ShowS
    showList :: [Normal3 a] -> ShowS
    Show, ReadPrec [Normal3 a]
    ReadPrec (Normal3 a)
    Int -> ReadS (Normal3 a)
    ReadS [Normal3 a]
    (Int -> ReadS (Normal3 a))
    -> ReadS [Normal3 a]
    -> ReadPrec (Normal3 a)
    -> ReadPrec [Normal3 a]
    -> Read (Normal3 a)
    forall a. Read a => ReadPrec [Normal3 a]
    forall a. Read a => ReadPrec (Normal3 a)
    forall a. Read a => Int -> ReadS (Normal3 a)
    forall a. Read a => ReadS [Normal3 a]
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: forall a. Read a => Int -> ReadS (Normal3 a)
    readsPrec :: Int -> ReadS (Normal3 a)
    $creadList :: forall a. Read a => ReadS [Normal3 a]
    readList :: ReadS [Normal3 a]
    $creadPrec :: forall a. Read a => ReadPrec (Normal3 a)
    readPrec :: ReadPrec (Normal3 a)
    $creadListPrec :: forall a. Read a => ReadPrec [Normal3 a]
    readListPrec :: ReadPrec [Normal3 a]
    Read, Typeable)
    instance Functor Normal3 where
       fmap :: forall a b. (a -> b) -> Normal3 a -> Normal3 b
    fmap a -> b
    f (Normal3 a
    x a
    y a
    z) = b -> b -> b -> Normal3 b
    forall a. a -> a -> a -> Normal3 a
    Normal3 (a -> b
    f a
    x) (a -> b
    f a
    y) (a -> b
    f a
    z)

    instance Applicative Normal3 where
       pure :: forall a. a -> Normal3 a
    pure a
    a = a -> a -> a -> Normal3 a
    forall a. a -> a -> a -> Normal3 a
    Normal3 a
    a a
    a a
    a
       Normal3 a -> b
    f a -> b
    g a -> b
    h <*> :: forall a b. Normal3 (a -> b) -> Normal3 a -> Normal3 b
    <*> Normal3 a
    x a
    y a
    z = b -> b -> b -> Normal3 b
    forall a. a -> a -> a -> Normal3 a
    Normal3 (a -> b
    f a
    x) (a -> b
    g a
    y) (a -> b
    h a
    z)

    instance Foldable Normal3 where
       foldr :: forall a b. (a -> b -> b) -> b -> Normal3 a -> b
    foldr a -> b -> b
    f b
    a (Normal3 a
    x a
    y a
    z) = a
    x `f ` (a
    y a -> b -> b
    `f` (a
    z a -> b -> b
    `f` b
    a))
       foldl :: forall b a. (b -> a -> b) -> b -> Normal3 a -> b
    foldl b -> a -> b
    f b
    a (Normal3 a
    x a
    y a
    z) = ((b
    a b -> a -> b
    `f` a
    x) b -> a -> b
    `f` a
    y) b -> a -> b
    `f` a
    z
       foldr1 :: forall a. (a -> a -> a) -> Normal3 a -> a
    foldr1 a -> a -> a
    f (Normal3 a
    x a
    y a
    z) = a
    x a -> a -> a
    `f` (a
    y a -> a -> a
    `f` a
    z)
       foldl1 :: forall a. (a -> a -> a) -> Normal3 a -> a
    foldl1 a -> a -> a
    f (Normal3 a
    x a
    y a
    z) = (a
    x a -> a -> a
    `f` a
    y) a -> a -> a
    `f` a
    z

    instance Traversable Normal3 where
       traverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Normal3 a -> f (Normal3 b)
    traverse a -> f b
    f (Normal3 a
    x a
    y a
    z) = (b -> b -> b -> Normal3 b) -> f (b -> b -> b -> Normal3 b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure b -> b -> b -> Normal3 b
    forall a. a -> a -> a -> Normal3 a
    Normal3 f (b -> b -> b -> Normal3 b) -> f b -> f (b -> b -> Normal3 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    x f (b -> b -> Normal3 b) -> f b -> f (b -> Normal3 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    y f (b -> Normal3 b) -> f b -> f (Normal3 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    z
       sequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    Normal3 (f a) -> f (Normal3 a)
    sequenceA (Normal3 f a
    x f a
    y f a
    z) =  (a -> a -> a -> Normal3 a) -> f (a -> a -> a -> Normal3 a)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure a -> a -> a -> Normal3 a
    forall a. a -> a -> a -> Normal3 a
    Normal3 f (a -> a -> a -> Normal3 a) -> f a -> f (a -> a -> Normal3 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    x f (a -> a -> Normal3 a) -> f a -> f (a -> Normal3 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    y f (a -> Normal3 a) -> f a -> f (Normal3 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    z
       mapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Normal3 a -> m (Normal3 b)
    mapM a -> m b
    f (Normal3 a
    x a
    y a
    z) = (b -> b -> b -> Normal3 b) -> m (b -> b -> b -> Normal3 b)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return b -> b -> b -> Normal3 b
    forall a. a -> a -> a -> Normal3 a
    Normal3 m (b -> b -> b -> Normal3 b) -> m b -> m (b -> b -> Normal3 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    x m (b -> b -> Normal3 b) -> m b -> m (b -> Normal3 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    y m (b -> Normal3 b) -> m b -> m (Normal3 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    z
       sequence :: forall (m :: * -> *) a. Monad m => Normal3 (m a) -> m (Normal3 a)
    sequence (Normal3 m a
    x m a
    y m a
    z) = (a -> a -> a -> Normal3 a) -> m (a -> a -> a -> Normal3 a)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return a -> a -> a -> Normal3 a
    forall a. a -> a -> a -> Normal3 a
    Normal3 m (a -> a -> a -> Normal3 a) -> m a -> m (a -> a -> Normal3 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    x m (a -> a -> Normal3 a) -> m a -> m (a -> Normal3 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    y m (a -> Normal3 a) -> m a -> m (Normal3 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    z

    instance Storable a => Storable (Normal3 a) where
       sizeOf :: Normal3 a -> Int
    sizeOf ~(Normal3 a
    x a
    _ a
    _) = Int
    3 Int -> Int -> Int
    forall a. Num a => a -> a -> a
    * a -> Int
    forall a. Storable a => a -> Int
    sizeOf a
    x
       alignment :: Normal3 a -> Int
    alignment ~(Normal3 a
    x a
    _ a
    _) = a -> Int
    forall a. Storable a => a -> Int
    alignment a
    x
       peek :: Ptr (Normal3 a) -> IO (Normal3 a)
    peek = Ptr (Normal3 a) -> IO (Normal3 a)
    forall (t :: * -> *) a.
    (Applicative t, Traversable t, Storable a) =>
    Ptr (t a) -> IO (t a)
    peekApplicativeTraversable
       poke :: Ptr (Normal3 a) -> Normal3 a -> IO ()
    poke = Ptr (Normal3 a) -> Normal3 a -> IO ()
    forall (t :: * -> *) a.
    (Foldable t, Storable a) =>
    Ptr (t a) -> t a -> IO ()
    pokeFoldable

    --------------------------------------------------------------------------------

    -- | A fog coordinate.
    newtype FogCoord1 a = FogCoord1 a
       deriving (FogCoord1 a -> FogCoord1 a -> Bool
    (FogCoord1 a -> FogCoord1 a -> Bool)
    -> (FogCoord1 a -> FogCoord1 a -> Bool) -> Eq (FogCoord1 a)
    forall a. Eq a => FogCoord1 a -> FogCoord1 a -> Bool
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: forall a. Eq a => FogCoord1 a -> FogCoord1 a -> Bool
    == :: FogCoord1 a -> FogCoord1 a -> Bool
    $c/= :: forall a. Eq a => FogCoord1 a -> FogCoord1 a -> Bool
    /= :: FogCoord1 a -> FogCoord1 a -> Bool
    Eq, Eq (FogCoord1 a)
    Eq (FogCoord1 a) =>
    (FogCoord1 a -> FogCoord1 a -> Ordering)
    -> (FogCoord1 a -> FogCoord1 a -> Bool)
    -> (FogCoord1 a -> FogCoord1 a -> Bool)
    -> (FogCoord1 a -> FogCoord1 a -> Bool)
    -> (FogCoord1 a -> FogCoord1 a -> Bool)
    -> (FogCoord1 a -> FogCoord1 a -> FogCoord1 a)
    -> (FogCoord1 a -> FogCoord1 a -> FogCoord1 a)
    -> Ord (FogCoord1 a)
    FogCoord1 a -> FogCoord1 a -> Bool
    FogCoord1 a -> FogCoord1 a -> Ordering
    FogCoord1 a -> FogCoord1 a -> FogCoord1 a
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall a. Ord a => Eq (FogCoord1 a)
    forall a. Ord a => FogCoord1 a -> FogCoord1 a -> Bool
    forall a. Ord a => FogCoord1 a -> FogCoord1 a -> Ordering
    forall a. Ord a => FogCoord1 a -> FogCoord1 a -> FogCoord1 a
    $ccompare :: forall a. Ord a => FogCoord1 a -> FogCoord1 a -> Ordering
    compare :: FogCoord1 a -> FogCoord1 a -> Ordering
    $c< :: forall a. Ord a => FogCoord1 a -> FogCoord1 a -> Bool
    < :: FogCoord1 a -> FogCoord1 a -> Bool
    $c<= :: forall a. Ord a => FogCoord1 a -> FogCoord1 a -> Bool
    <= :: FogCoord1 a -> FogCoord1 a -> Bool
    $c> :: forall a. Ord a => FogCoord1 a -> FogCoord1 a -> Bool
    > :: FogCoord1 a -> FogCoord1 a -> Bool
    $c>= :: forall a. Ord a => FogCoord1 a -> FogCoord1 a -> Bool
    >= :: FogCoord1 a -> FogCoord1 a -> Bool
    $cmax :: forall a. Ord a => FogCoord1 a -> FogCoord1 a -> FogCoord1 a
    max :: FogCoord1 a -> FogCoord1 a -> FogCoord1 a
    $cmin :: forall a. Ord a => FogCoord1 a -> FogCoord1 a -> FogCoord1 a
    min :: FogCoord1 a -> FogCoord1 a -> FogCoord1 a
    Ord, Ord (FogCoord1 a)
    Ord (FogCoord1 a) =>
    ((FogCoord1 a, FogCoord1 a) -> [FogCoord1 a])
    -> ((FogCoord1 a, FogCoord1 a) -> FogCoord1 a -> Int)
    -> ((FogCoord1 a, FogCoord1 a) -> FogCoord1 a -> Int)
    -> ((FogCoord1 a, FogCoord1 a) -> FogCoord1 a -> Bool)
    -> ((FogCoord1 a, FogCoord1 a) -> Int)
    -> ((FogCoord1 a, FogCoord1 a) -> Int)
    -> Ix (FogCoord1 a)
    (FogCoord1 a, FogCoord1 a) -> Int
    (FogCoord1 a, FogCoord1 a) -> [FogCoord1 a]
    (FogCoord1 a, FogCoord1 a) -> FogCoord1 a -> Bool
    (FogCoord1 a, FogCoord1 a) -> FogCoord1 a -> Int
    forall a.
    Ord a =>
    ((a, a) -> [a])
    -> ((a, a) -> a -> Int)
    -> ((a, a) -> a -> Int)
    -> ((a, a) -> a -> Bool)
    -> ((a, a) -> Int)
    -> ((a, a) -> Int)
    -> Ix a
    forall a. Ix a => Ord (FogCoord1 a)
    forall a. Ix a => (FogCoord1 a, FogCoord1 a) -> Int
    forall a. Ix a => (FogCoord1 a, FogCoord1 a) -> [FogCoord1 a]
    forall a. Ix a => (FogCoord1 a, FogCoord1 a) -> FogCoord1 a -> Bool
    forall a. Ix a => (FogCoord1 a, FogCoord1 a) -> FogCoord1 a -> Int
    $crange :: forall a. Ix a => (FogCoord1 a, FogCoord1 a) -> [FogCoord1 a]
    range :: (FogCoord1 a, FogCoord1 a) -> [FogCoord1 a]
    $cindex :: forall a. Ix a => (FogCoord1 a, FogCoord1 a) -> FogCoord1 a -> Int
    index :: (FogCoord1 a, FogCoord1 a) -> FogCoord1 a -> Int
    $cunsafeIndex :: forall a. Ix a => (FogCoord1 a, FogCoord1 a) -> FogCoord1 a -> Int
    unsafeIndex :: (FogCoord1 a, FogCoord1 a) -> FogCoord1 a -> Int
    $cinRange :: forall a. Ix a => (FogCoord1 a, FogCoord1 a) -> FogCoord1 a -> Bool
    inRange :: (FogCoord1 a, FogCoord1 a) -> FogCoord1 a -> Bool
    $crangeSize :: forall a. Ix a => (FogCoord1 a, FogCoord1 a) -> Int
    rangeSize :: (FogCoord1 a, FogCoord1 a) -> Int
    $cunsafeRangeSize :: forall a. Ix a => (FogCoord1 a, FogCoord1 a) -> Int
    unsafeRangeSize :: (FogCoord1 a, FogCoord1 a) -> Int
    Ix, FogCoord1 a
    FogCoord1 a -> FogCoord1 a -> Bounded (FogCoord1 a)
    forall a. a -> a -> Bounded a
    forall a. Bounded a => FogCoord1 a
    $cminBound :: forall a. Bounded a => FogCoord1 a
    minBound :: FogCoord1 a
    $cmaxBound :: forall a. Bounded a => FogCoord1 a
    maxBound :: FogCoord1 a
    Bounded, Int -> FogCoord1 a -> ShowS
    [FogCoord1 a] -> ShowS
    FogCoord1 a -> String
    (Int -> FogCoord1 a -> ShowS)
    -> (FogCoord1 a -> String)
    -> ([FogCoord1 a] -> ShowS)
    -> Show (FogCoord1 a)
    forall a. Show a => Int -> FogCoord1 a -> ShowS
    forall a. Show a => [FogCoord1 a] -> ShowS
    forall a. Show a => FogCoord1 a -> String
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: forall a. Show a => Int -> FogCoord1 a -> ShowS
    showsPrec :: Int -> FogCoord1 a -> ShowS
    $cshow :: forall a. Show a => FogCoord1 a -> String
    show :: FogCoord1 a -> String
    $cshowList :: forall a. Show a => [FogCoord1 a] -> ShowS
    showList :: [FogCoord1 a] -> ShowS
    Show, ReadPrec [FogCoord1 a]
    ReadPrec (FogCoord1 a)
    Int -> ReadS (FogCoord1 a)
    ReadS [FogCoord1 a]
    (Int -> ReadS (FogCoord1 a))
    -> ReadS [FogCoord1 a]
    -> ReadPrec (FogCoord1 a)
    -> ReadPrec [FogCoord1 a]
    -> Read (FogCoord1 a)
    forall a. Read a => ReadPrec [FogCoord1 a]
    forall a. Read a => ReadPrec (FogCoord1 a)
    forall a. Read a => Int -> ReadS (FogCoord1 a)
    forall a. Read a => ReadS [FogCoord1 a]
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: forall a. Read a => Int -> ReadS (FogCoord1 a)
    readsPrec :: Int -> ReadS (FogCoord1 a)
    $creadList :: forall a. Read a => ReadS [FogCoord1 a]
    readList :: ReadS [FogCoord1 a]
    $creadPrec :: forall a. Read a => ReadPrec (FogCoord1 a)
    readPrec :: ReadPrec (FogCoord1 a)
    $creadListPrec :: forall a. Read a => ReadPrec [FogCoord1 a]
    readListPrec :: ReadPrec [FogCoord1 a]
    Read, Typeable)

    instance Functor FogCoord1 where
       fmap :: forall a b. (a -> b) -> FogCoord1 a -> FogCoord1 b
    fmap a -> b
    f (FogCoord1 a
    x) = b -> FogCoord1 b
    forall a. a -> FogCoord1 a
    FogCoord1 (a -> b
    f a
    x)

    instance Applicative FogCoord1 where
       pure :: forall a. a -> FogCoord1 a
    pure a
    a = a -> FogCoord1 a
    forall a. a -> FogCoord1 a
    FogCoord1 a
    a
       FogCoord1 a -> b
    f <*> :: forall a b. FogCoord1 (a -> b) -> FogCoord1 a -> FogCoord1 b
    <*> FogCoord1 a
    x = b -> FogCoord1 b
    forall a. a -> FogCoord1 a
    FogCoord1 (a -> b
    f a
    x)

    instance Foldable FogCoord1 where
       foldr :: forall a b. (a -> b -> b) -> b -> FogCoord1 a -> b
    foldr a -> b -> b
    f b
    a (FogCoord1 a
    x) = a
    x `f ` b
    a
       foldl :: forall b a. (b -> a -> b) -> b -> FogCoord1 a -> b
    foldl b -> a -> b
    f b
    a (FogCoord1 a
    x)  = b
    a b -> a -> b
    `f` a
    x
       foldr1 :: forall a. (a -> a -> a) -> FogCoord1 a -> a
    foldr1 a -> a -> a
    _ (FogCoord1 a
    x) = a
    x
       foldl1 :: forall a. (a -> a -> a) -> FogCoord1 a -> a
    foldl1 a -> a -> a
    _ (FogCoord1 a
    x) = a
    x

    instance Traversable FogCoord1 where
       traverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> FogCoord1 a -> f (FogCoord1 b)
    traverse a -> f b
    f (FogCoord1 a
    x) = (b -> FogCoord1 b) -> f (b -> FogCoord1 b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure b -> FogCoord1 b
    forall a. a -> FogCoord1 a
    FogCoord1 f (b -> FogCoord1 b) -> f b -> f (FogCoord1 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    x
       sequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    FogCoord1 (f a) -> f (FogCoord1 a)
    sequenceA (FogCoord1 f a
    x) =  (a -> FogCoord1 a) -> f (a -> FogCoord1 a)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure a -> FogCoord1 a
    forall a. a -> FogCoord1 a
    FogCoord1 f (a -> FogCoord1 a) -> f a -> f (FogCoord1 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    x
       mapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> FogCoord1 a -> m (FogCoord1 b)
    mapM a -> m b
    f (FogCoord1 a
    x) = (b -> FogCoord1 b) -> m (b -> FogCoord1 b)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return b -> FogCoord1 b
    forall a. a -> FogCoord1 a
    FogCoord1 m (b -> FogCoord1 b) -> m b -> m (FogCoord1 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    x
       sequence :: forall (m :: * -> *) a.
    Monad m =>
    FogCoord1 (m a) -> m (FogCoord1 a)
    sequence (FogCoord1 m a
    x) = (a -> FogCoord1 a) -> m (a -> FogCoord1 a)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return a -> FogCoord1 a
    forall a. a -> FogCoord1 a
    FogCoord1 m (a -> FogCoord1 a) -> m a -> m (FogCoord1 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    x

    instance Storable a => Storable (FogCoord1 a) where
       sizeOf :: FogCoord1 a -> Int
    sizeOf    ~(FogCoord1 a
    s) = a -> Int
    forall a. Storable a => a -> Int
    sizeOf a
    s
       alignment :: FogCoord1 a -> Int
    alignment ~(FogCoord1 a
    s) = a -> Int
    forall a. Storable a => a -> Int
    alignment a
    s
       peek :: Ptr (FogCoord1 a) -> IO (FogCoord1 a)
    peek = Ptr (FogCoord1 a) -> IO (FogCoord1 a)
    forall (t :: * -> *) a.
    (Applicative t, Traversable t, Storable a) =>
    Ptr (t a) -> IO (t a)
    peekApplicativeTraversable
       poke :: Ptr (FogCoord1 a) -> FogCoord1 a -> IO ()
    poke = Ptr (FogCoord1 a) -> FogCoord1 a -> IO ()
    forall (t :: * -> *) a.
    (Foldable t, Storable a) =>
    Ptr (t a) -> t a -> IO ()
    pokeFoldable

    --------------------------------------------------------------------------------

    -- An RGBA color with /A/=1.
    data Color3 a = Color3 !a !a !a
       deriving (Color3 a -> Color3 a -> Bool
    (Color3 a -> Color3 a -> Bool)
    -> (Color3 a -> Color3 a -> Bool) -> Eq (Color3 a)
    forall a. Eq a => Color3 a -> Color3 a -> Bool
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: forall a. Eq a => Color3 a -> Color3 a -> Bool
    == :: Color3 a -> Color3 a -> Bool
    $c/= :: forall a. Eq a => Color3 a -> Color3 a -> Bool
    /= :: Color3 a -> Color3 a -> Bool
    Eq, Eq (Color3 a)
    Eq (Color3 a) =>
    (Color3 a -> Color3 a -> Ordering)
    -> (Color3 a -> Color3 a -> Bool)
    -> (Color3 a -> Color3 a -> Bool)
    -> (Color3 a -> Color3 a -> Bool)
    -> (Color3 a -> Color3 a -> Bool)
    -> (Color3 a -> Color3 a -> Color3 a)
    -> (Color3 a -> Color3 a -> Color3 a)
    -> Ord (Color3 a)
    Color3 a -> Color3 a -> Bool
    Color3 a -> Color3 a -> Ordering
    Color3 a -> Color3 a -> Color3 a
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall a. Ord a => Eq (Color3 a)
    forall a. Ord a => Color3 a -> Color3 a -> Bool
    forall a. Ord a => Color3 a -> Color3 a -> Ordering
    forall a. Ord a => Color3 a -> Color3 a -> Color3 a
    $ccompare :: forall a. Ord a => Color3 a -> Color3 a -> Ordering
    compare :: Color3 a -> Color3 a -> Ordering
    $c< :: forall a. Ord a => Color3 a -> Color3 a -> Bool
    < :: Color3 a -> Color3 a -> Bool
    $c<= :: forall a. Ord a => Color3 a -> Color3 a -> Bool
    <= :: Color3 a -> Color3 a -> Bool
    $c> :: forall a. Ord a => Color3 a -> Color3 a -> Bool
    > :: Color3 a -> Color3 a -> Bool
    $c>= :: forall a. Ord a => Color3 a -> Color3 a -> Bool
    >= :: Color3 a -> Color3 a -> Bool
    $cmax :: forall a. Ord a => Color3 a -> Color3 a -> Color3 a
    max :: Color3 a -> Color3 a -> Color3 a
    $cmin :: forall a. Ord a => Color3 a -> Color3 a -> Color3 a
    min :: Color3 a -> Color3 a -> Color3 a
    Ord, Ord (Color3 a)
    Ord (Color3 a) =>
    ((Color3 a, Color3 a) -> [Color3 a])
    -> ((Color3 a, Color3 a) -> Color3 a -> Int)
    -> ((Color3 a, Color3 a) -> Color3 a -> Int)
    -> ((Color3 a, Color3 a) -> Color3 a -> Bool)
    -> ((Color3 a, Color3 a) -> Int)
    -> ((Color3 a, Color3 a) -> Int)
    -> Ix (Color3 a)
    (Color3 a, Color3 a) -> Int
    (Color3 a, Color3 a) -> [Color3 a]
    (Color3 a, Color3 a) -> Color3 a -> Bool
    (Color3 a, Color3 a) -> Color3 a -> Int
    forall a.
    Ord a =>
    ((a, a) -> [a])
    -> ((a, a) -> a -> Int)
    -> ((a, a) -> a -> Int)
    -> ((a, a) -> a -> Bool)
    -> ((a, a) -> Int)
    -> ((a, a) -> Int)
    -> Ix a
    forall a. Ix a => Ord (Color3 a)
    forall a. Ix a => (Color3 a, Color3 a) -> Int
    forall a. Ix a => (Color3 a, Color3 a) -> [Color3 a]
    forall a. Ix a => (Color3 a, Color3 a) -> Color3 a -> Bool
    forall a. Ix a => (Color3 a, Color3 a) -> Color3 a -> Int
    $crange :: forall a. Ix a => (Color3 a, Color3 a) -> [Color3 a]
    range :: (Color3 a, Color3 a) -> [Color3 a]
    $cindex :: forall a. Ix a => (Color3 a, Color3 a) -> Color3 a -> Int
    index :: (Color3 a, Color3 a) -> Color3 a -> Int
    $cunsafeIndex :: forall a. Ix a => (Color3 a, Color3 a) -> Color3 a -> Int
    unsafeIndex :: (Color3 a, Color3 a) -> Color3 a -> Int
    $cinRange :: forall a. Ix a => (Color3 a, Color3 a) -> Color3 a -> Bool
    inRange :: (Color3 a, Color3 a) -> Color3 a -> Bool
    $crangeSize :: forall a. Ix a => (Color3 a, Color3 a) -> Int
    rangeSize :: (Color3 a, Color3 a) -> Int
    $cunsafeRangeSize :: forall a. Ix a => (Color3 a, Color3 a) -> Int
    unsafeRangeSize :: (Color3 a, Color3 a) -> Int
    Ix, Color3 a
    Color3 a -> Color3 a -> Bounded (Color3 a)
    forall a. a -> a -> Bounded a
    forall a. Bounded a => Color3 a
    $cminBound :: forall a. Bounded a => Color3 a
    minBound :: Color3 a
    $cmaxBound :: forall a. Bounded a => Color3 a
    maxBound :: Color3 a
    Bounded, Int -> Color3 a -> ShowS
    [Color3 a] -> ShowS
    Color3 a -> String
    (Int -> Color3 a -> ShowS)
    -> (Color3 a -> String) -> ([Color3 a] -> ShowS) -> Show (Color3 a)
    forall a. Show a => Int -> Color3 a -> ShowS
    forall a. Show a => [Color3 a] -> ShowS
    forall a. Show a => Color3 a -> String
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: forall a. Show a => Int -> Color3 a -> ShowS
    showsPrec :: Int -> Color3 a -> ShowS
    $cshow :: forall a. Show a => Color3 a -> String
    show :: Color3 a -> String
    $cshowList :: forall a. Show a => [Color3 a] -> ShowS
    showList :: [Color3 a] -> ShowS
    Show, ReadPrec [Color3 a]
    ReadPrec (Color3 a)
    Int -> ReadS (Color3 a)
    ReadS [Color3 a]
    (Int -> ReadS (Color3 a))
    -> ReadS [Color3 a]
    -> ReadPrec (Color3 a)
    -> ReadPrec [Color3 a]
    -> Read (Color3 a)
    forall a. Read a => ReadPrec [Color3 a]
    forall a. Read a => ReadPrec (Color3 a)
    forall a. Read a => Int -> ReadS (Color3 a)
    forall a. Read a => ReadS [Color3 a]
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: forall a. Read a => Int -> ReadS (Color3 a)
    readsPrec :: Int -> ReadS (Color3 a)
    $creadList :: forall a. Read a => ReadS [Color3 a]
    readList :: ReadS [Color3 a]
    $creadPrec :: forall a. Read a => ReadPrec (Color3 a)
    readPrec :: ReadPrec (Color3 a)
    $creadListPrec :: forall a. Read a => ReadPrec [Color3 a]
    readListPrec :: ReadPrec [Color3 a]
    Read, Typeable)

    instance Functor Color3 where
       fmap :: forall a b. (a -> b) -> Color3 a -> Color3 b
    fmap a -> b
    f (Color3 a
    x a
    y a
    z) = b -> b -> b -> Color3 b
    forall a. a -> a -> a -> Color3 a
    Color3 (a -> b
    f a
    x) (a -> b
    f a
    y) (a -> b
    f a
    z)

    instance Applicative Color3 where
       pure :: forall a. a -> Color3 a
    pure a
    a = a -> a -> a -> Color3 a
    forall a. a -> a -> a -> Color3 a
    Color3 a
    a a
    a a
    a
       Color3 a -> b
    f a -> b
    g a -> b
    h <*> :: forall a b. Color3 (a -> b) -> Color3 a -> Color3 b
    <*> Color3 a
    x a
    y a
    z = b -> b -> b -> Color3 b
    forall a. a -> a -> a -> Color3 a
    Color3 (a -> b
    f a
    x) (a -> b
    g a
    y) (a -> b
    h a
    z)

    instance Foldable Color3 where
       foldr :: forall a b. (a -> b -> b) -> b -> Color3 a -> b
    foldr a -> b -> b
    f b
    a (Color3 a
    x a
    y a
    z) = a
    x `f ` (a
    y a -> b -> b
    `f` (a
    z a -> b -> b
    `f` b
    a))
       foldl :: forall b a. (b -> a -> b) -> b -> Color3 a -> b
    foldl b -> a -> b
    f b
    a (Color3 a
    x a
    y a
    z) = ((b
    a b -> a -> b
    `f` a
    x) b -> a -> b
    `f` a
    y) b -> a -> b
    `f` a
    z
       foldr1 :: forall a. (a -> a -> a) -> Color3 a -> a
    foldr1 a -> a -> a
    f (Color3 a
    x a
    y a
    z) = a
    x a -> a -> a
    `f` (a
    y a -> a -> a
    `f` a
    z)
       foldl1 :: forall a. (a -> a -> a) -> Color3 a -> a
    foldl1 a -> a -> a
    f (Color3 a
    x a
    y a
    z) = (a
    x a -> a -> a
    `f` a
    y) a -> a -> a
    `f` a
    z

    instance Traversable Color3 where
       traverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Color3 a -> f (Color3 b)
    traverse a -> f b
    f (Color3 a
    x a
    y a
    z) = (b -> b -> b -> Color3 b) -> f (b -> b -> b -> Color3 b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure b -> b -> b -> Color3 b
    forall a. a -> a -> a -> Color3 a
    Color3 f (b -> b -> b -> Color3 b) -> f b -> f (b -> b -> Color3 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    x f (b -> b -> Color3 b) -> f b -> f (b -> Color3 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    y f (b -> Color3 b) -> f b -> f (Color3 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    z
       sequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    Color3 (f a) -> f (Color3 a)
    sequenceA (Color3 f a
    x f a
    y f a
    z) =  (a -> a -> a -> Color3 a) -> f (a -> a -> a -> Color3 a)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure a -> a -> a -> Color3 a
    forall a. a -> a -> a -> Color3 a
    Color3 f (a -> a -> a -> Color3 a) -> f a -> f (a -> a -> Color3 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    x f (a -> a -> Color3 a) -> f a -> f (a -> Color3 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    y f (a -> Color3 a) -> f a -> f (Color3 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    z
       mapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Color3 a -> m (Color3 b)
    mapM a -> m b
    f (Color3 a
    x a
    y a
    z) = (b -> b -> b -> Color3 b) -> m (b -> b -> b -> Color3 b)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return b -> b -> b -> Color3 b
    forall a. a -> a -> a -> Color3 a
    Color3 m (b -> b -> b -> Color3 b) -> m b -> m (b -> b -> Color3 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    x m (b -> b -> Color3 b) -> m b -> m (b -> Color3 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    y m (b -> Color3 b) -> m b -> m (Color3 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    z
       sequence :: forall (m :: * -> *) a. Monad m => Color3 (m a) -> m (Color3 a)
    sequence (Color3 m a
    x m a
    y m a
    z) = (a -> a -> a -> Color3 a) -> m (a -> a -> a -> Color3 a)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return a -> a -> a -> Color3 a
    forall a. a -> a -> a -> Color3 a
    Color3 m (a -> a -> a -> Color3 a) -> m a -> m (a -> a -> Color3 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    x m (a -> a -> Color3 a) -> m a -> m (a -> Color3 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    y m (a -> Color3 a) -> m a -> m (Color3 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    z

    instance Storable a => Storable (Color3 a) where
       sizeOf :: Color3 a -> Int
    sizeOf ~(Color3 a
    x a
    _ a
    _) = Int
    3 Int -> Int -> Int
    forall a. Num a => a -> a -> a
    * a -> Int
    forall a. Storable a => a -> Int
    sizeOf a
    x
       alignment :: Color3 a -> Int
    alignment ~(Color3 a
    x a
    _ a
    _) = a -> Int
    forall a. Storable a => a -> Int
    alignment a
    x
       peek :: Ptr (Color3 a) -> IO (Color3 a)
    peek = Ptr (Color3 a) -> IO (Color3 a)
    forall (t :: * -> *) a.
    (Applicative t, Traversable t, Storable a) =>
    Ptr (t a) -> IO (t a)
    peekApplicativeTraversable
       poke :: Ptr (Color3 a) -> Color3 a -> IO ()
    poke = Ptr (Color3 a) -> Color3 a -> IO ()
    forall (t :: * -> *) a.
    (Foldable t, Storable a) =>
    Ptr (t a) -> t a -> IO ()
    pokeFoldable

    --------------------------------------------------------------------------------

    -- | A fully-fledged RGBA color.
    data Color4 a = Color4 !a !a !a !a
       deriving (Color4 a -> Color4 a -> Bool
    (Color4 a -> Color4 a -> Bool)
    -> (Color4 a -> Color4 a -> Bool) -> Eq (Color4 a)
    forall a. Eq a => Color4 a -> Color4 a -> Bool
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: forall a. Eq a => Color4 a -> Color4 a -> Bool
    == :: Color4 a -> Color4 a -> Bool
    $c/= :: forall a. Eq a => Color4 a -> Color4 a -> Bool
    /= :: Color4 a -> Color4 a -> Bool
    Eq, Eq (Color4 a)
    Eq (Color4 a) =>
    (Color4 a -> Color4 a -> Ordering)
    -> (Color4 a -> Color4 a -> Bool)
    -> (Color4 a -> Color4 a -> Bool)
    -> (Color4 a -> Color4 a -> Bool)
    -> (Color4 a -> Color4 a -> Bool)
    -> (Color4 a -> Color4 a -> Color4 a)
    -> (Color4 a -> Color4 a -> Color4 a)
    -> Ord (Color4 a)
    Color4 a -> Color4 a -> Bool
    Color4 a -> Color4 a -> Ordering
    Color4 a -> Color4 a -> Color4 a
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall a. Ord a => Eq (Color4 a)
    forall a. Ord a => Color4 a -> Color4 a -> Bool
    forall a. Ord a => Color4 a -> Color4 a -> Ordering
    forall a. Ord a => Color4 a -> Color4 a -> Color4 a
    $ccompare :: forall a. Ord a => Color4 a -> Color4 a -> Ordering
    compare :: Color4 a -> Color4 a -> Ordering
    $c< :: forall a. Ord a => Color4 a -> Color4 a -> Bool
    < :: Color4 a -> Color4 a -> Bool
    $c<= :: forall a. Ord a => Color4 a -> Color4 a -> Bool
    <= :: Color4 a -> Color4 a -> Bool
    $c> :: forall a. Ord a => Color4 a -> Color4 a -> Bool
    > :: Color4 a -> Color4 a -> Bool
    $c>= :: forall a. Ord a => Color4 a -> Color4 a -> Bool
    >= :: Color4 a -> Color4 a -> Bool
    $cmax :: forall a. Ord a => Color4 a -> Color4 a -> Color4 a
    max :: Color4 a -> Color4 a -> Color4 a
    $cmin :: forall a. Ord a => Color4 a -> Color4 a -> Color4 a
    min :: Color4 a -> Color4 a -> Color4 a
    Ord, Ord (Color4 a)
    Ord (Color4 a) =>
    ((Color4 a, Color4 a) -> [Color4 a])
    -> ((Color4 a, Color4 a) -> Color4 a -> Int)
    -> ((Color4 a, Color4 a) -> Color4 a -> Int)
    -> ((Color4 a, Color4 a) -> Color4 a -> Bool)
    -> ((Color4 a, Color4 a) -> Int)
    -> ((Color4 a, Color4 a) -> Int)
    -> Ix (Color4 a)
    (Color4 a, Color4 a) -> Int
    (Color4 a, Color4 a) -> [Color4 a]
    (Color4 a, Color4 a) -> Color4 a -> Bool
    (Color4 a, Color4 a) -> Color4 a -> Int
    forall a.
    Ord a =>
    ((a, a) -> [a])
    -> ((a, a) -> a -> Int)
    -> ((a, a) -> a -> Int)
    -> ((a, a) -> a -> Bool)
    -> ((a, a) -> Int)
    -> ((a, a) -> Int)
    -> Ix a
    forall a. Ix a => Ord (Color4 a)
    forall a. Ix a => (Color4 a, Color4 a) -> Int
    forall a. Ix a => (Color4 a, Color4 a) -> [Color4 a]
    forall a. Ix a => (Color4 a, Color4 a) -> Color4 a -> Bool
    forall a. Ix a => (Color4 a, Color4 a) -> Color4 a -> Int
    $crange :: forall a. Ix a => (Color4 a, Color4 a) -> [Color4 a]
    range :: (Color4 a, Color4 a) -> [Color4 a]
    $cindex :: forall a. Ix a => (Color4 a, Color4 a) -> Color4 a -> Int
    index :: (Color4 a, Color4 a) -> Color4 a -> Int
    $cunsafeIndex :: forall a. Ix a => (Color4 a, Color4 a) -> Color4 a -> Int
    unsafeIndex :: (Color4 a, Color4 a) -> Color4 a -> Int
    $cinRange :: forall a. Ix a => (Color4 a, Color4 a) -> Color4 a -> Bool
    inRange :: (Color4 a, Color4 a) -> Color4 a -> Bool
    $crangeSize :: forall a. Ix a => (Color4 a, Color4 a) -> Int
    rangeSize :: (Color4 a, Color4 a) -> Int
    $cunsafeRangeSize :: forall a. Ix a => (Color4 a, Color4 a) -> Int
    unsafeRangeSize :: (Color4 a, Color4 a) -> Int
    Ix, Color4 a
    Color4 a -> Color4 a -> Bounded (Color4 a)
    forall a. a -> a -> Bounded a
    forall a. Bounded a => Color4 a
    $cminBound :: forall a. Bounded a => Color4 a
    minBound :: Color4 a
    $cmaxBound :: forall a. Bounded a => Color4 a
    maxBound :: Color4 a
    Bounded, Int -> Color4 a -> ShowS
    [Color4 a] -> ShowS
    Color4 a -> String
    (Int -> Color4 a -> ShowS)
    -> (Color4 a -> String) -> ([Color4 a] -> ShowS) -> Show (Color4 a)
    forall a. Show a => Int -> Color4 a -> ShowS
    forall a. Show a => [Color4 a] -> ShowS
    forall a. Show a => Color4 a -> String
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: forall a. Show a => Int -> Color4 a -> ShowS
    showsPrec :: Int -> Color4 a -> ShowS
    $cshow :: forall a. Show a => Color4 a -> String
    show :: Color4 a -> String
    $cshowList :: forall a. Show a => [Color4 a] -> ShowS
    showList :: [Color4 a] -> ShowS
    Show, ReadPrec [Color4 a]
    ReadPrec (Color4 a)
    Int -> ReadS (Color4 a)
    ReadS [Color4 a]
    (Int -> ReadS (Color4 a))
    -> ReadS [Color4 a]
    -> ReadPrec (Color4 a)
    -> ReadPrec [Color4 a]
    -> Read (Color4 a)
    forall a. Read a => ReadPrec [Color4 a]
    forall a. Read a => ReadPrec (Color4 a)
    forall a. Read a => Int -> ReadS (Color4 a)
    forall a. Read a => ReadS [Color4 a]
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: forall a. Read a => Int -> ReadS (Color4 a)
    readsPrec :: Int -> ReadS (Color4 a)
    $creadList :: forall a. Read a => ReadS [Color4 a]
    readList :: ReadS [Color4 a]
    $creadPrec :: forall a. Read a => ReadPrec (Color4 a)
    readPrec :: ReadPrec (Color4 a)
    $creadListPrec :: forall a. Read a => ReadPrec [Color4 a]
    readListPrec :: ReadPrec [Color4 a]
    Read, Typeable)

    instance Functor Color4 where
       fmap :: forall a b. (a -> b) -> Color4 a -> Color4 b
    fmap a -> b
    f (Color4 a
    x a
    y a
    z a
    w) = b -> b -> b -> b -> Color4 b
    forall a. a -> a -> a -> a -> Color4 a
    Color4 (a -> b
    f a
    x) (a -> b
    f a
    y) (a -> b
    f a
    z) (a -> b
    f a
    w)

    instance Applicative Color4 where
       pure :: forall a. a -> Color4 a
    pure a
    a = a -> a -> a -> a -> Color4 a
    forall a. a -> a -> a -> a -> Color4 a
    Color4 a
    a a
    a a
    a a
    a
       Color4 a -> b
    f a -> b
    g a -> b
    h a -> b
    i <*> :: forall a b. Color4 (a -> b) -> Color4 a -> Color4 b
    <*> Color4 a
    x a
    y a
    z a
    w = b -> b -> b -> b -> Color4 b
    forall a. a -> a -> a -> a -> Color4 a
    Color4 (a -> b
    f a
    x) (a -> b
    g a
    y) (a -> b
    h a
    z) (a -> b
    i a
    w)

    instance Foldable Color4 where
       foldr :: forall a b. (a -> b -> b) -> b -> Color4 a -> b
    foldr a -> b -> b
    f b
    a (Color4 a
    x a
    y a
    z a
    w) = a
    x `f ` (a
    y a -> b -> b
    `f` (a
    z a -> b -> b
    `f` (a
    w a -> b -> b
    `f` b
    a)))
       foldl :: forall b a. (b -> a -> b) -> b -> Color4 a -> b
    foldl b -> a -> b
    f b
    a (Color4 a
    x a
    y a
    z a
    w) = (((b
    a b -> a -> b
    `f` a
    x) b -> a -> b
    `f` a
    y) b -> a -> b
    `f` a
    z) b -> a -> b
    `f` a
    w
       foldr1 :: forall a. (a -> a -> a) -> Color4 a -> a
    foldr1 a -> a -> a
    f (Color4 a
    x a
    y a
    z a
    w) = a
    x a -> a -> a
    `f` (a
    y a -> a -> a
    `f` (a
    z a -> a -> a
    `f` a
    w))
       foldl1 :: forall a. (a -> a -> a) -> Color4 a -> a
    foldl1 a -> a -> a
    f (Color4 a
    x a
    y a
    z a
    w) = ((a
    x a -> a -> a
    `f` a
    y) a -> a -> a
    `f` a
    z) a -> a -> a
    `f` a
    w

    instance Traversable Color4 where
       traverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Color4 a -> f (Color4 b)
    traverse a -> f b
    f (Color4 a
    x a
    y a
    z a
    w) = (b -> b -> b -> b -> Color4 b) -> f (b -> b -> b -> b -> Color4 b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure b -> b -> b -> b -> Color4 b
    forall a. a -> a -> a -> a -> Color4 a
    Color4 f (b -> b -> b -> b -> Color4 b)
    -> f b -> f (b -> b -> b -> Color4 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    x f (b -> b -> b -> Color4 b) -> f b -> f (b -> b -> Color4 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    y f (b -> b -> Color4 b) -> f b -> f (b -> Color4 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    z f (b -> Color4 b) -> f b -> f (Color4 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    w
       sequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    Color4 (f a) -> f (Color4 a)
    sequenceA (Color4 f a
    x f a
    y f a
    z f a
    w) =  (a -> a -> a -> a -> Color4 a) -> f (a -> a -> a -> a -> Color4 a)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure a -> a -> a -> a -> Color4 a
    forall a. a -> a -> a -> a -> Color4 a
    Color4 f (a -> a -> a -> a -> Color4 a)
    -> f a -> f (a -> a -> a -> Color4 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    x f (a -> a -> a -> Color4 a) -> f a -> f (a -> a -> Color4 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    y f (a -> a -> Color4 a) -> f a -> f (a -> Color4 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    z f (a -> Color4 a) -> f a -> f (Color4 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    w
       mapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Color4 a -> m (Color4 b)
    mapM a -> m b
    f (Color4 a
    x a
    y a
    z a
    w) = (b -> b -> b -> b -> Color4 b) -> m (b -> b -> b -> b -> Color4 b)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return b -> b -> b -> b -> Color4 b
    forall a. a -> a -> a -> a -> Color4 a
    Color4 m (b -> b -> b -> b -> Color4 b)
    -> m b -> m (b -> b -> b -> Color4 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    x m (b -> b -> b -> Color4 b) -> m b -> m (b -> b -> Color4 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    y m (b -> b -> Color4 b) -> m b -> m (b -> Color4 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    z m (b -> Color4 b) -> m b -> m (Color4 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    w
       sequence :: forall (m :: * -> *) a. Monad m => Color4 (m a) -> m (Color4 a)
    sequence (Color4 m a
    x m a
    y m a
    z m a
    w) = (a -> a -> a -> a -> Color4 a) -> m (a -> a -> a -> a -> Color4 a)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return a -> a -> a -> a -> Color4 a
    forall a. a -> a -> a -> a -> Color4 a
    Color4 m (a -> a -> a -> a -> Color4 a)
    -> m a -> m (a -> a -> a -> Color4 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    x m (a -> a -> a -> Color4 a) -> m a -> m (a -> a -> Color4 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    y m (a -> a -> Color4 a) -> m a -> m (a -> Color4 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    z m (a -> Color4 a) -> m a -> m (Color4 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    w

    instance Storable a => Storable (Color4 a) where
       sizeOf :: Color4 a -> Int
    sizeOf ~(Color4 a
    x a
    _ a
    _ a
    _) = Int
    4 Int -> Int -> Int
    forall a. Num a => a -> a -> a
    * a -> Int
    forall a. Storable a => a -> Int
    sizeOf a
    x
       alignment :: Color4 a -> Int
    alignment ~(Color4 a
    x a
    _ a
    _ a
    _) = a -> Int
    forall a. Storable a => a -> Int
    alignment a
    x
       peek :: Ptr (Color4 a) -> IO (Color4 a)
    peek = Ptr (Color4 a) -> IO (Color4 a)
    forall (t :: * -> *) a.
    (Applicative t, Traversable t, Storable a) =>
    Ptr (t a) -> IO (t a)
    peekApplicativeTraversable
       poke :: Ptr (Color4 a) -> Color4 a -> IO ()
    poke = Ptr (Color4 a) -> Color4 a -> IO ()
    forall (t :: * -> *) a.
    (Foldable t, Storable a) =>
    Ptr (t a) -> t a -> IO ()
    pokeFoldable

    --------------------------------------------------------------------------------

    -- | A color index.
    newtype Index1 a = Index1 a
       deriving (Index1 a -> Index1 a -> Bool
    (Index1 a -> Index1 a -> Bool)
    -> (Index1 a -> Index1 a -> Bool) -> Eq (Index1 a)
    forall a. Eq a => Index1 a -> Index1 a -> Bool
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: forall a. Eq a => Index1 a -> Index1 a -> Bool
    == :: Index1 a -> Index1 a -> Bool
    $c/= :: forall a. Eq a => Index1 a -> Index1 a -> Bool
    /= :: Index1 a -> Index1 a -> Bool
    Eq, Eq (Index1 a)
    Eq (Index1 a) =>
    (Index1 a -> Index1 a -> Ordering)
    -> (Index1 a -> Index1 a -> Bool)
    -> (Index1 a -> Index1 a -> Bool)
    -> (Index1 a -> Index1 a -> Bool)
    -> (Index1 a -> Index1 a -> Bool)
    -> (Index1 a -> Index1 a -> Index1 a)
    -> (Index1 a -> Index1 a -> Index1 a)
    -> Ord (Index1 a)
    Index1 a -> Index1 a -> Bool
    Index1 a -> Index1 a -> Ordering
    Index1 a -> Index1 a -> Index1 a
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall a. Ord a => Eq (Index1 a)
    forall a. Ord a => Index1 a -> Index1 a -> Bool
    forall a. Ord a => Index1 a -> Index1 a -> Ordering
    forall a. Ord a => Index1 a -> Index1 a -> Index1 a
    $ccompare :: forall a. Ord a => Index1 a -> Index1 a -> Ordering
    compare :: Index1 a -> Index1 a -> Ordering
    $c< :: forall a. Ord a => Index1 a -> Index1 a -> Bool
    < :: Index1 a -> Index1 a -> Bool
    $c<= :: forall a. Ord a => Index1 a -> Index1 a -> Bool
    <= :: Index1 a -> Index1 a -> Bool
    $c> :: forall a. Ord a => Index1 a -> Index1 a -> Bool
    > :: Index1 a -> Index1 a -> Bool
    $c>= :: forall a. Ord a => Index1 a -> Index1 a -> Bool
    >= :: Index1 a -> Index1 a -> Bool
    $cmax :: forall a. Ord a => Index1 a -> Index1 a -> Index1 a
    max :: Index1 a -> Index1 a -> Index1 a
    $cmin :: forall a. Ord a => Index1 a -> Index1 a -> Index1 a
    min :: Index1 a -> Index1 a -> Index1 a
    Ord, Ord (Index1 a)
    Ord (Index1 a) =>
    ((Index1 a, Index1 a) -> [Index1 a])
    -> ((Index1 a, Index1 a) -> Index1 a -> Int)
    -> ((Index1 a, Index1 a) -> Index1 a -> Int)
    -> ((Index1 a, Index1 a) -> Index1 a -> Bool)
    -> ((Index1 a, Index1 a) -> Int)
    -> ((Index1 a, Index1 a) -> Int)
    -> Ix (Index1 a)
    (Index1 a, Index1 a) -> Int
    (Index1 a, Index1 a) -> [Index1 a]
    (Index1 a, Index1 a) -> Index1 a -> Bool
    (Index1 a, Index1 a) -> Index1 a -> Int
    forall a.
    Ord a =>
    ((a, a) -> [a])
    -> ((a, a) -> a -> Int)
    -> ((a, a) -> a -> Int)
    -> ((a, a) -> a -> Bool)
    -> ((a, a) -> Int)
    -> ((a, a) -> Int)
    -> Ix a
    forall a. Ix a => Ord (Index1 a)
    forall a. Ix a => (Index1 a, Index1 a) -> Int
    forall a. Ix a => (Index1 a, Index1 a) -> [Index1 a]
    forall a. Ix a => (Index1 a, Index1 a) -> Index1 a -> Bool
    forall a. Ix a => (Index1 a, Index1 a) -> Index1 a -> Int
    $crange :: forall a. Ix a => (Index1 a, Index1 a) -> [Index1 a]
    range :: (Index1 a, Index1 a) -> [Index1 a]
    $cindex :: forall a. Ix a => (Index1 a, Index1 a) -> Index1 a -> Int
    index :: (Index1 a, Index1 a) -> Index1 a -> Int
    $cunsafeIndex :: forall a. Ix a => (Index1 a, Index1 a) -> Index1 a -> Int
    unsafeIndex :: (Index1 a, Index1 a) -> Index1 a -> Int
    $cinRange :: forall a. Ix a => (Index1 a, Index1 a) -> Index1 a -> Bool
    inRange :: (Index1 a, Index1 a) -> Index1 a -> Bool
    $crangeSize :: forall a. Ix a => (Index1 a, Index1 a) -> Int
    rangeSize :: (Index1 a, Index1 a) -> Int
    $cunsafeRangeSize :: forall a. Ix a => (Index1 a, Index1 a) -> Int
    unsafeRangeSize :: (Index1 a, Index1 a) -> Int
    Ix, Index1 a
    Index1 a -> Index1 a -> Bounded (Index1 a)
    forall a. a -> a -> Bounded a
    forall a. Bounded a => Index1 a
    $cminBound :: forall a. Bounded a => Index1 a
    minBound :: Index1 a
    $cmaxBound :: forall a. Bounded a => Index1 a
    maxBound :: Index1 a
    Bounded, Int -> Index1 a -> ShowS
    [Index1 a] -> ShowS
    Index1 a -> String
    (Int -> Index1 a -> ShowS)
    -> (Index1 a -> String) -> ([Index1 a] -> ShowS) -> Show (Index1 a)
    forall a. Show a => Int -> Index1 a -> ShowS
    forall a. Show a => [Index1 a] -> ShowS
    forall a. Show a => Index1 a -> String
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: forall a. Show a => Int -> Index1 a -> ShowS
    showsPrec :: Int -> Index1 a -> ShowS
    $cshow :: forall a. Show a => Index1 a -> String
    show :: Index1 a -> String
    $cshowList :: forall a. Show a => [Index1 a] -> ShowS
    showList :: [Index1 a] -> ShowS
    Show, ReadPrec [Index1 a]
    ReadPrec (Index1 a)
    Int -> ReadS (Index1 a)
    ReadS [Index1 a]
    (Int -> ReadS (Index1 a))
    -> ReadS [Index1 a]
    -> ReadPrec (Index1 a)
    -> ReadPrec [Index1 a]
    -> Read (Index1 a)
    forall a. Read a => ReadPrec [Index1 a]
    forall a. Read a => ReadPrec (Index1 a)
    forall a. Read a => Int -> ReadS (Index1 a)
    forall a. Read a => ReadS [Index1 a]
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: forall a. Read a => Int -> ReadS (Index1 a)
    readsPrec :: Int -> ReadS (Index1 a)
    $creadList :: forall a. Read a => ReadS [Index1 a]
    readList :: ReadS [Index1 a]
    $creadPrec :: forall a. Read a => ReadPrec (Index1 a)
    readPrec :: ReadPrec (Index1 a)
    $creadListPrec :: forall a. Read a => ReadPrec [Index1 a]
    readListPrec :: ReadPrec [Index1 a]
    Read, Typeable)

    instance Functor Index1 where
       fmap :: forall a b. (a -> b) -> Index1 a -> Index1 b
    fmap a -> b
    f (Index1 a
    x) = b -> Index1 b
    forall a. a -> Index1 a
    Index1 (a -> b
    f a
    x)

    instance Applicative Index1 where
       pure :: forall a. a -> Index1 a
    pure a
    a = a -> Index1 a
    forall a. a -> Index1 a
    Index1 a
    a
       Index1 a -> b
    f <*> :: forall a b. Index1 (a -> b) -> Index1 a -> Index1 b
    <*> Index1 a
    x = b -> Index1 b
    forall a. a -> Index1 a
    Index1 (a -> b
    f a
    x)

    instance Foldable Index1 where
       foldr :: forall a b. (a -> b -> b) -> b -> Index1 a -> b
    foldr a -> b -> b
    f b
    a (Index1 a
    x) = a
    x `f ` b
    a
       foldl :: forall b a. (b -> a -> b) -> b -> Index1 a -> b
    foldl b -> a -> b
    f b
    a (Index1 a
    x)  = b
    a b -> a -> b
    `f` a
    x
       foldr1 :: forall a. (a -> a -> a) -> Index1 a -> a
    foldr1 a -> a -> a
    _ (Index1 a
    x) = a
    x
       foldl1 :: forall a. (a -> a -> a) -> Index1 a -> a
    foldl1 a -> a -> a
    _ (Index1 a
    x) = a
    x

    instance Traversable Index1 where
       traverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Index1 a -> f (Index1 b)
    traverse a -> f b
    f (Index1 a
    x) = (b -> Index1 b) -> f (b -> Index1 b)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure b -> Index1 b
    forall a. a -> Index1 a
    Index1 f (b -> Index1 b) -> f b -> f (Index1 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    x
       sequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    Index1 (f a) -> f (Index1 a)
    sequenceA (Index1 f a
    x) =  (a -> Index1 a) -> f (a -> Index1 a)
    forall a. a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure a -> Index1 a
    forall a. a -> Index1 a
    Index1 f (a -> Index1 a) -> f a -> f (Index1 a)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    x
       mapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Index1 a -> m (Index1 b)
    mapM a -> m b
    f (Index1 a
    x) = (b -> Index1 b) -> m (b -> Index1 b)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return b -> Index1 b
    forall a. a -> Index1 a
    Index1 m (b -> Index1 b) -> m b -> m (Index1 b)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` a -> m b
    f a
    x
       sequence :: forall (m :: * -> *) a. Monad m => Index1 (m a) -> m (Index1 a)
    sequence (Index1 m a
    x) = (a -> Index1 a) -> m (a -> Index1 a)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return a -> Index1 a
    forall a. a -> Index1 a
    Index1 m (a -> Index1 a) -> m a -> m (Index1 a)
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    `ap` m a
    x

    instance Storable a => Storable (Index1 a) where
       sizeOf :: Index1 a -> Int
    sizeOf    ~(Index1 a
    s) = a -> Int
    forall a. Storable a => a -> Int
    sizeOf a
    s
       alignment :: Index1 a -> Int
    alignment ~(Index1 a
    s) = a -> Int
    forall a. Storable a => a -> Int
    alignment a
    s
       peek :: Ptr (Index1 a) -> IO (Index1 a)
    peek = Ptr (Index1 a) -> IO (Index1 a)
    forall (t :: * -> *) a.
    (Applicative t, Traversable t, Storable a) =>
    Ptr (t a) -> IO (t a)
    peekApplicativeTraversable
       poke :: Ptr (Index1 a) -> Index1 a -> IO ()
    poke = Ptr (Index1 a) -> Index1 a -> IO ()
    forall (t :: * -> *) a.
    (Foldable t, Storable a) =>
    Ptr (t a) -> t a -> IO ()
    pokeFoldable

    --------------------------------------------------------------------------------

    peekApplicativeTraversable :: (Applicative t, Traversable t, Storable a) => Ptr (t a) -> IO (t a)
    peekApplicativeTraversable :: forall (t :: * -> *) a.
    (Applicative t, Traversable t, Storable a) =>
    Ptr (t a) -> IO (t a)
    peekApplicativeTraversable = (Ptr a -> IO a) -> t (Ptr a) -> IO (t a)
    forall (t :: * -> *) (m :: * -> *) a b.
    (Traversable t, Monad m) =>
    (a -> m b) -> t a -> m (t b)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> t a -> m (t b)
    Data.Traversable.mapM Ptr a -> IO a
    forall a. Storable a => Ptr a -> IO a
    peek (t (Ptr a) -> IO (t a))
    -> (Ptr (t a) -> t (Ptr a)) -> Ptr (t a) -> IO (t a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Ptr (t a) -> t (Ptr a)
    forall (t :: * -> *) a.
    (Applicative t, Traversable t, Storable a) =>
    Ptr (t a) -> t (Ptr a)
    addresses

    addresses :: (Applicative t, Traversable t, Storable a) => Ptr (t a) -> t (Ptr a)
    addresses :: forall (t :: * -> *) a.
    (Applicative t, Traversable t, Storable a) =>
    Ptr (t a) -> t (Ptr a)
    addresses = (Int, t (Ptr a)) -> t (Ptr a)
    forall a b. (a, b) -> b
    snd ((Int, t (Ptr a)) -> t (Ptr a))
    -> (Ptr (t a) -> (Int, t (Ptr a))) -> Ptr (t a) -> t (Ptr a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> Ptr a -> (Int, Ptr a))
    -> Int -> t (Ptr a) -> (Int, t (Ptr a))
    forall (t :: * -> *) s a b.
    Traversable t =>
    (s -> a -> (s, b)) -> s -> t a -> (s, t b)
    mapAccumL Int -> Ptr a -> (Int, Ptr a)
    forall a. Storable a => Int -> Ptr a -> (Int, Ptr a)
    nextPtr Int
    0 (t (Ptr a) -> (Int, t (Ptr a)))
    -> (Ptr (t a) -> t (Ptr a)) -> Ptr (t a) -> (Int, t (Ptr a))
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Ptr a -> t (Ptr a)
    forall a. a -> t a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (Ptr a -> t (Ptr a))
    -> (Ptr (t a) -> Ptr a) -> Ptr (t a) -> t (Ptr a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Ptr (t a) -> Ptr a
    forall a b. Ptr a -> Ptr b
    castPtr

    nextPtr :: Storable a => Int -> Ptr a -> (Int, Ptr a)
    nextPtr :: forall a. Storable a => Int -> Ptr a -> (Int, Ptr a)
    nextPtr Int
    offset Ptr a
    ptr = (Int
    offset Int -> Int -> Int
    forall a. Num a => a -> a -> a
    + Int
    1, Ptr a -> Int -> Ptr a
    forall a. Storable a => Ptr a -> Int -> Ptr a
    advancePtr Ptr a
    ptr Int
    offset)

    --------------------------------------------------------------------------------

    pokeFoldable :: (Foldable t, Storable a) => Ptr (t a) -> t a -> IO ()
    pokeFoldable :: forall (t :: * -> *) a.
    (Foldable t, Storable a) =>
    Ptr (t a) -> t a -> IO ()
    pokeFoldable Ptr (t a)
    ptr t a
    xs = (Ptr a -> a -> IO (Ptr a)) -> Ptr a -> t a -> IO (Ptr a)
    forall (t :: * -> *) (m :: * -> *) b a.
    (Foldable t, Monad m) =>
    (b -> a -> m b) -> b -> t a -> m b
    foldlM Ptr a -> a -> IO (Ptr a)
    forall a. Storable a => Ptr a -> a -> IO (Ptr a)
    pokeAndAdvance (Ptr (t a) -> Ptr a
    forall a b. Ptr a -> Ptr b
    castPtr Ptr (t a)
    ptr) t a
    xs IO (Ptr a) -> IO () -> IO ()
    forall a b. IO a -> IO b -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    >> () -> IO ()
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    pokeAndAdvance :: Storable a => Ptr a -> a -> IO (Ptr a)
    pokeAndAdvance :: forall a. Storable a => Ptr a -> a -> IO (Ptr a)
    pokeAndAdvance Ptr a
    ptr a
    value = do
       Ptr a -> a -> IO ()
    forall a. Storable a => Ptr a -> a -> IO ()
    poke Ptr a
    ptr a
    value
       Ptr a -> IO (Ptr a)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (Ptr a -> IO (Ptr a)) -> Ptr a -> IO (Ptr a)
    forall a b. (a -> b) -> a -> b
    $ Ptr a
    ptr Ptr a -> Int -> Ptr a
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` a -> Int
    forall a. Storable a => a -> Int
    sizeOf a
    value