    {-# LANGUAGE CPP                        #-}
    {-# LANGUAGE DeriveDataTypeable         #-}
    {-# LANGUAGE DeriveGeneric              #-}
    {-# LANGUAGE DeriveTraversable          #-}
    {-# LANGUAGE FlexibleContexts           #-}
    {-# LANGUAGE GeneralizedNewtypeDeriving #-}
    {-# LANGUAGE MultiParamTypeClasses      #-}
    {-# LANGUAGE ScopedTypeVariables        #-}
    {-# LANGUAGE Trustworthy                #-}
    {-# LANGUAGE TypeFamilies               #-}

    #ifndef MIN_VERSION_vector
    #define MIN_VERSION_vector(x,y,z) 1
    #endif

    -----------------------------------------------------------------------------
    -- |
    -- Copyright   :  (C) 2012-2015 Edward Kmett
    -- License     :  BSD-style (see the file LICENSE)
    --
    -- Maintainer  :  Edward Kmett <ekmett@gmail.com>
    -- Stability   :  experimental
    -- Portability :  non-portable
    ----------------------------------------------------------------------------

    module SDL.Internal.Vect
      ( Point (..)
      , V2 (..)
      , V3 (..)
      , V4 (..)
      ) where

    import           Control.Applicative
    import           Control.Monad               (liftM)
    import           Control.Monad.Fix
    import           Control.Monad.Zip
    import           Data.Data
    import           Data.Foldable
    import           Data.Monoid
    import           Data.Traversable
    import qualified Data.Vector.Generic         as G
    import qualified Data.Vector.Generic.Mutable as M
    import qualified Data.Vector.Unboxed.Base    as U
    import           Foreign.Ptr                 (castPtr)
    import           Foreign.Storable            (Storable (..))
    import           GHC.Arr                     (Ix (..))
    import           GHC.Generics                (Generic, Generic1)
    import           Prelude
    -- Explicit Prelude import suppresses warnings about redundant imports.
    {-# ANN module "HLint: ignore Reduce duplication" #-}
    {-# ANN module "HLint: ignore Use fmap" #-}

    -- | A handy wrapper to help distinguish points from vectors at the
    -- type level
    newtype Point f a = P (f a)
      deriving ( Point f a -> Point f a -> Bool
    (Point f a -> Point f a -> Bool)
    -> (Point f a -> Point f a -> Bool) -> Eq (Point f a)
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    forall (f :: Type -> Type) a.
    Eq (f a) =>
    Point f a -> Point f a -> Bool
    $c== :: forall (f :: Type -> Type) a.
    Eq (f a) =>
    Point f a -> Point f a -> Bool
    == :: Point f a -> Point f a -> Bool
    $c/= :: forall (f :: Type -> Type) a.
    Eq (f a) =>
    Point f a -> Point f a -> Bool
    /= :: Point f a -> Point f a -> Bool
    Eq, Eq (Point f a)
    Eq (Point f a) =>
    (Point f a -> Point f a -> Ordering)
    -> (Point f a -> Point f a -> Bool)
    -> (Point f a -> Point f a -> Bool)
    -> (Point f a -> Point f a -> Bool)
    -> (Point f a -> Point f a -> Bool)
    -> (Point f a -> Point f a -> Point f a)
    -> (Point f a -> Point f a -> Point f a)
    -> Ord (Point f a)
    Point f a -> Point f a -> Bool
    Point f a -> Point f a -> Ordering
    Point f a -> Point f a -> Point f 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 (f :: Type -> Type) a. Ord (f a) => Eq (Point f a)
    forall (f :: Type -> Type) a.
    Ord (f a) =>
    Point f a -> Point f a -> Bool
    forall (f :: Type -> Type) a.
    Ord (f a) =>
    Point f a -> Point f a -> Ordering
    forall (f :: Type -> Type) a.
    Ord (f a) =>
    Point f a -> Point f a -> Point f a
    $ccompare :: forall (f :: Type -> Type) a.
    Ord (f a) =>
    Point f a -> Point f a -> Ordering
    compare :: Point f a -> Point f a -> Ordering
    $c< :: forall (f :: Type -> Type) a.
    Ord (f a) =>
    Point f a -> Point f a -> Bool
    < :: Point f a -> Point f a -> Bool
    $c<= :: forall (f :: Type -> Type) a.
    Ord (f a) =>
    Point f a -> Point f a -> Bool
    <= :: Point f a -> Point f a -> Bool
    $c> :: forall (f :: Type -> Type) a.
    Ord (f a) =>
    Point f a -> Point f a -> Bool
    > :: Point f a -> Point f a -> Bool
    $c>= :: forall (f :: Type -> Type) a.
    Ord (f a) =>
    Point f a -> Point f a -> Bool
    >= :: Point f a -> Point f a -> Bool
    $cmax :: forall (f :: Type -> Type) a.
    Ord (f a) =>
    Point f a -> Point f a -> Point f a
    max :: Point f a -> Point f a -> Point f a
    $cmin :: forall (f :: Type -> Type) a.
    Ord (f a) =>
    Point f a -> Point f a -> Point f a
    min :: Point f a -> Point f a -> Point f a
    Ord, Int -> Point f a -> ShowS
    [Point f a] -> ShowS
    Point f a -> String
    (Int -> Point f a -> ShowS)
    -> (Point f a -> String)
    -> ([Point f a] -> ShowS)
    -> Show (Point f a)
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    forall (f :: Type -> Type) a.
    Show (f a) =>
    Int -> Point f a -> ShowS
    forall (f :: Type -> Type) a. Show (f a) => [Point f a] -> ShowS
    forall (f :: Type -> Type) a. Show (f a) => Point f a -> String
    $cshowsPrec :: forall (f :: Type -> Type) a.
    Show (f a) =>
    Int -> Point f a -> ShowS
    showsPrec :: Int -> Point f a -> ShowS
    $cshow :: forall (f :: Type -> Type) a. Show (f a) => Point f a -> String
    show :: Point f a -> String
    $cshowList :: forall (f :: Type -> Type) a. Show (f a) => [Point f a] -> ShowS
    showList :: [Point f a] -> ShowS
    Show, ReadPrec [Point f a]
    ReadPrec (Point f a)
    Int -> ReadS (Point f a)
    ReadS [Point f a]
    (Int -> ReadS (Point f a))
    -> ReadS [Point f a]
    -> ReadPrec (Point f a)
    -> ReadPrec [Point f a]
    -> Read (Point f a)
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    forall (f :: Type -> Type) a. Read (f a) => ReadPrec [Point f a]
    forall (f :: Type -> Type) a. Read (f a) => ReadPrec (Point f a)
    forall (f :: Type -> Type) a.
    Read (f a) =>
    Int -> ReadS (Point f a)
    forall (f :: Type -> Type) a. Read (f a) => ReadS [Point f a]
    $creadsPrec :: forall (f :: Type -> Type) a.
    Read (f a) =>
    Int -> ReadS (Point f a)
    readsPrec :: Int -> ReadS (Point f a)
    $creadList :: forall (f :: Type -> Type) a. Read (f a) => ReadS [Point f a]
    readList :: ReadS [Point f a]
    $creadPrec :: forall (f :: Type -> Type) a. Read (f a) => ReadPrec (Point f a)
    readPrec :: ReadPrec (Point f a)
    $creadListPrec :: forall (f :: Type -> Type) a. Read (f a) => ReadPrec [Point f a]
    readListPrec :: ReadPrec [Point f a]
    Read, Applicative (Point f)
    Applicative (Point f) =>
    (forall a b. Point f a -> (a -> Point f b) -> Point f b)
    -> (forall a b. Point f a -> Point f b -> Point f b)
    -> (forall a. a -> Point f a)
    -> Monad (Point f)
    forall a. a -> Point f a
    forall a b. Point f a -> Point f b -> Point f b
    forall a b. Point f a -> (a -> Point f b) -> Point f b
    forall (f :: Type -> Type). Monad f => Applicative (Point f)
    forall (f :: Type -> Type) a. Monad f => a -> Point f a
    forall (f :: Type -> Type) a b.
    Monad f =>
    Point f a -> Point f b -> Point f b
    forall (f :: Type -> Type) a b.
    Monad f =>
    Point f a -> (a -> Point f b) -> Point f b
    forall (m :: Type -> Type).
    Applicative m =>
    (forall a b. m a -> (a -> m b) -> m b)
    -> (forall a b. m a -> m b -> m b)
    -> (forall a. a -> m a)
    -> Monad m
    $c>>= :: forall (f :: Type -> Type) a b.
    Monad f =>
    Point f a -> (a -> Point f b) -> Point f b
    >>= :: forall a b. Point f a -> (a -> Point f b) -> Point f b
    $c>> :: forall (f :: Type -> Type) a b.
    Monad f =>
    Point f a -> Point f b -> Point f b
    >> :: forall a b. Point f a -> Point f b -> Point f b
    $creturn :: forall (f :: Type -> Type) a. Monad f => a -> Point f a
    return :: forall a. a -> Point f a
    Monad, (forall a b. (a -> b) -> Point f a -> Point f b)
    -> (forall a b. a -> Point f b -> Point f a) -> Functor (Point f)
    forall a b. a -> Point f b -> Point f a
    forall a b. (a -> b) -> Point f a -> Point f b
    forall (f :: Type -> Type) a b.
    Functor f =>
    a -> Point f b -> Point f a
    forall (f :: Type -> Type) a b.
    Functor f =>
    (a -> b) -> Point f a -> Point f b
    forall (f :: Type -> Type).
    (forall a b. (a -> b) -> f a -> f b)
    -> (forall a b. a -> f b -> f a) -> Functor f
    $cfmap :: forall (f :: Type -> Type) a b.
    Functor f =>
    (a -> b) -> Point f a -> Point f b
    fmap :: forall a b. (a -> b) -> Point f a -> Point f b
    $c<$ :: forall (f :: Type -> Type) a b.
    Functor f =>
    a -> Point f b -> Point f a
    <$ :: forall a b. a -> Point f b -> Point f a
    Functor, Functor (Point f)
    Functor (Point f) =>
    (forall a. a -> Point f a)
    -> (forall a b. Point f (a -> b) -> Point f a -> Point f b)
    -> (forall a b c.
        (a -> b -> c) -> Point f a -> Point f b -> Point f c)
    -> (forall a b. Point f a -> Point f b -> Point f b)
    -> (forall a b. Point f a -> Point f b -> Point f a)
    -> Applicative (Point f)
    forall a. a -> Point f a
    forall a b. Point f a -> Point f b -> Point f a
    forall a b. Point f a -> Point f b -> Point f b
    forall a b. Point f (a -> b) -> Point f a -> Point f b
    forall a b c. (a -> b -> c) -> Point f a -> Point f b -> Point f c
    forall (f :: Type -> Type).
    Functor f =>
    (forall a. a -> f a)
    -> (forall a b. f (a -> b) -> f a -> f b)
    -> (forall a b c. (a -> b -> c) -> f a -> f b -> f c)
    -> (forall a b. f a -> f b -> f b)
    -> (forall a b. f a -> f b -> f a)
    -> Applicative f
    forall (f :: Type -> Type). Applicative f => Functor (Point f)
    forall (f :: Type -> Type) a. Applicative f => a -> Point f a
    forall (f :: Type -> Type) a b.
    Applicative f =>
    Point f a -> Point f b -> Point f a
    forall (f :: Type -> Type) a b.
    Applicative f =>
    Point f a -> Point f b -> Point f b
    forall (f :: Type -> Type) a b.
    Applicative f =>
    Point f (a -> b) -> Point f a -> Point f b
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> Point f a -> Point f b -> Point f c
    $cpure :: forall (f :: Type -> Type) a. Applicative f => a -> Point f a
    pure :: forall a. a -> Point f a
    $c<*> :: forall (f :: Type -> Type) a b.
    Applicative f =>
    Point f (a -> b) -> Point f a -> Point f b
    <*> :: forall a b. Point f (a -> b) -> Point f a -> Point f b
    $cliftA2 :: forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> Point f a -> Point f b -> Point f c
    liftA2 :: forall a b c. (a -> b -> c) -> Point f a -> Point f b -> Point f c
    $c*> :: forall (f :: Type -> Type) a b.
    Applicative f =>
    Point f a -> Point f b -> Point f b
    *> :: forall a b. Point f a -> Point f b -> Point f b
    $c<* :: forall (f :: Type -> Type) a b.
    Applicative f =>
    Point f a -> Point f b -> Point f a
    <* :: forall a b. Point f a -> Point f b -> Point f a
    Applicative, (forall m. Monoid m => Point f m -> m)
    -> (forall m a. Monoid m => (a -> m) -> Point f a -> m)
    -> (forall m a. Monoid m => (a -> m) -> Point f a -> m)
    -> (forall a b. (a -> b -> b) -> b -> Point f a -> b)
    -> (forall a b. (a -> b -> b) -> b -> Point f a -> b)
    -> (forall b a. (b -> a -> b) -> b -> Point f a -> b)
    -> (forall b a. (b -> a -> b) -> b -> Point f a -> b)
    -> (forall a. (a -> a -> a) -> Point f a -> a)
    -> (forall a. (a -> a -> a) -> Point f a -> a)
    -> (forall a. Point f a -> [a])
    -> (forall a. Point f a -> Bool)
    -> (forall a. Point f a -> Int)
    -> (forall a. Eq a => a -> Point f a -> Bool)
    -> (forall a. Ord a => Point f a -> a)
    -> (forall a. Ord a => Point f a -> a)
    -> (forall a. Num a => Point f a -> a)
    -> (forall a. Num a => Point f a -> a)
    -> Foldable (Point f)
    forall a. Eq a => a -> Point f a -> Bool
    forall a. Num a => Point f a -> a
    forall a. Ord a => Point f a -> a
    forall m. Monoid m => Point f m -> m
    forall a. Point f a -> Bool
    forall a. Point f a -> Int
    forall a. Point f a -> [a]
    forall a. (a -> a -> a) -> Point f a -> a
    forall m a. Monoid m => (a -> m) -> Point f a -> m
    forall b a. (b -> a -> b) -> b -> Point f a -> b
    forall a b. (a -> b -> b) -> b -> Point f a -> b
    forall (f :: Type -> Type) a.
    (Foldable f, Eq a) =>
    a -> Point f a -> Bool
    forall (f :: Type -> Type) a. (Foldable f, Num a) => Point f a -> a
    forall (f :: Type -> Type) a. (Foldable f, Ord a) => Point f a -> a
    forall (f :: Type -> Type) m.
    (Foldable f, Monoid m) =>
    Point f m -> m
    forall (f :: Type -> Type) a. Foldable f => Point f a -> Bool
    forall (f :: Type -> Type) a. Foldable f => Point f a -> Int
    forall (f :: Type -> Type) a. Foldable f => Point f a -> [a]
    forall (f :: Type -> Type) a.
    Foldable f =>
    (a -> a -> a) -> Point f a -> a
    forall (f :: Type -> Type) m a.
    (Foldable f, Monoid m) =>
    (a -> m) -> Point f a -> m
    forall (f :: Type -> Type) b a.
    Foldable f =>
    (b -> a -> b) -> b -> Point f a -> b
    forall (f :: Type -> Type) a b.
    Foldable f =>
    (a -> b -> b) -> b -> Point f a -> b
    forall (t :: Type -> Type).
    (forall m. Monoid m => t m -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. t a -> [a])
    -> (forall a. t a -> Bool)
    -> (forall a. t a -> Int)
    -> (forall a. Eq a => a -> t a -> Bool)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> Foldable t
    $cfold :: forall (f :: Type -> Type) m.
    (Foldable f, Monoid m) =>
    Point f m -> m
    fold :: forall m. Monoid m => Point f m -> m
    $cfoldMap :: forall (f :: Type -> Type) m a.
    (Foldable f, Monoid m) =>
    (a -> m) -> Point f a -> m
    foldMap :: forall m a. Monoid m => (a -> m) -> Point f a -> m
    $cfoldMap' :: forall (f :: Type -> Type) m a.
    (Foldable f, Monoid m) =>
    (a -> m) -> Point f a -> m
    foldMap' :: forall m a. Monoid m => (a -> m) -> Point f a -> m
    $cfoldr :: forall (f :: Type -> Type) a b.
    Foldable f =>
    (a -> b -> b) -> b -> Point f a -> b
    foldr :: forall a b. (a -> b -> b) -> b -> Point f a -> b
    $cfoldr' :: forall (f :: Type -> Type) a b.
    Foldable f =>
    (a -> b -> b) -> b -> Point f a -> b
    foldr' :: forall a b. (a -> b -> b) -> b -> Point f a -> b
    $cfoldl :: forall (f :: Type -> Type) b a.
    Foldable f =>
    (b -> a -> b) -> b -> Point f a -> b
    foldl :: forall b a. (b -> a -> b) -> b -> Point f a -> b
    $cfoldl' :: forall (f :: Type -> Type) b a.
    Foldable f =>
    (b -> a -> b) -> b -> Point f a -> b
    foldl' :: forall b a. (b -> a -> b) -> b -> Point f a -> b
    $cfoldr1 :: forall (f :: Type -> Type) a.
    Foldable f =>
    (a -> a -> a) -> Point f a -> a
    foldr1 :: forall a. (a -> a -> a) -> Point f a -> a
    $cfoldl1 :: forall (f :: Type -> Type) a.
    Foldable f =>
    (a -> a -> a) -> Point f a -> a
    foldl1 :: forall a. (a -> a -> a) -> Point f a -> a
    $ctoList :: forall (f :: Type -> Type) a. Foldable f => Point f a -> [a]
    toList :: forall a. Point f a -> [a]
    $cnull :: forall (f :: Type -> Type) a. Foldable f => Point f a -> Bool
    null :: forall a. Point f a -> Bool
    $clength :: forall (f :: Type -> Type) a. Foldable f => Point f a -> Int
    length :: forall a. Point f a -> Int
    $celem :: forall (f :: Type -> Type) a.
    (Foldable f, Eq a) =>
    a -> Point f a -> Bool
    elem :: forall a. Eq a => a -> Point f a -> Bool
    $cmaximum :: forall (f :: Type -> Type) a. (Foldable f, Ord a) => Point f a -> a
    maximum :: forall a. Ord a => Point f a -> a
    $cminimum :: forall (f :: Type -> Type) a. (Foldable f, Ord a) => Point f a -> a
    minimum :: forall a. Ord a => Point f a -> a
    $csum :: forall (f :: Type -> Type) a. (Foldable f, Num a) => Point f a -> a
    sum :: forall a. Num a => Point f a -> a
    $cproduct :: forall (f :: Type -> Type) a. (Foldable f, Num a) => Point f a -> a
    product :: forall a. Num a => Point f a -> a
    Foldable
               , Functor (Point f)
    Foldable (Point f)
    (Functor (Point f), Foldable (Point f)) =>
    (forall (f :: Type -> Type) a b.
     Applicative f =>
     (a -> f b) -> Point f a -> f (Point f b))
    -> (forall (f :: Type -> Type) a.
        Applicative f =>
        Point f (f a) -> f (Point f a))
    -> (forall (m :: Type -> Type) a b.
        Monad m =>
        (a -> m b) -> Point f a -> m (Point f b))
    -> (forall (m :: Type -> Type) a.
        Monad m =>
        Point f (m a) -> m (Point f a))
    -> Traversable (Point f)
    forall (t :: Type -> Type).
    (Functor t, Foldable t) =>
    (forall (f :: Type -> Type) a b.
     Applicative f =>
     (a -> f b) -> t a -> f (t b))
    -> (forall (f :: Type -> Type) a.
        Applicative f =>
        t (f a) -> f (t a))
    -> (forall (m :: Type -> Type) a b.
        Monad m =>
        (a -> m b) -> t a -> m (t b))
    -> (forall (m :: Type -> Type) a. Monad m => t (m a) -> m (t a))
    -> Traversable t
    forall (f :: Type -> Type). Traversable f => Functor (Point f)
    forall (f :: Type -> Type). Traversable f => Foldable (Point f)
    forall (f :: Type -> Type) (m :: Type -> Type) a.
    (Traversable f, Monad m) =>
    Point f (m a) -> m (Point f a)
    forall (f :: Type -> Type) (f :: Type -> Type) a.
    (Traversable f, Applicative f) =>
    Point f (f a) -> f (Point f a)
    forall (f :: Type -> Type) (m :: Type -> Type) a b.
    (Traversable f, Monad m) =>
    (a -> m b) -> Point f a -> m (Point f b)
    forall (f :: Type -> Type) (f :: Type -> Type) a b.
    (Traversable f, Applicative f) =>
    (a -> f b) -> Point f a -> f (Point f b)
    forall (m :: Type -> Type) a.
    Monad m =>
    Point f (m a) -> m (Point f a)
    forall (f :: Type -> Type) a.
    Applicative f =>
    Point f (f a) -> f (Point f a)
    forall (m :: Type -> Type) a b.
    Monad m =>
    (a -> m b) -> Point f a -> m (Point f b)
    forall (f :: Type -> Type) a b.
    Applicative f =>
    (a -> f b) -> Point f a -> f (Point f b)
    $ctraverse :: forall (f :: Type -> Type) (f :: Type -> Type) a b.
    (Traversable f, Applicative f) =>
    (a -> f b) -> Point f a -> f (Point f b)
    traverse :: forall (f :: Type -> Type) a b.
    Applicative f =>
    (a -> f b) -> Point f a -> f (Point f b)
    $csequenceA :: forall (f :: Type -> Type) (f :: Type -> Type) a.
    (Traversable f, Applicative f) =>
    Point f (f a) -> f (Point f a)
    sequenceA :: forall (f :: Type -> Type) a.
    Applicative f =>
    Point f (f a) -> f (Point f a)
    $cmapM :: forall (f :: Type -> Type) (m :: Type -> Type) a b.
    (Traversable f, Monad m) =>
    (a -> m b) -> Point f a -> m (Point f b)
    mapM :: forall (m :: Type -> Type) a b.
    Monad m =>
    (a -> m b) -> Point f a -> m (Point f b)
    $csequence :: forall (f :: Type -> Type) (m :: Type -> Type) a.
    (Traversable f, Monad m) =>
    Point f (m a) -> m (Point f a)
    sequence :: forall (m :: Type -> Type) a.
    Monad m =>
    Point f (m a) -> m (Point f a)
    Traversable, Num (Point f a)
    Num (Point f a) =>
    (Point f a -> Point f a -> Point f a)
    -> (Point f a -> Point f a)
    -> (Rational -> Point f a)
    -> Fractional (Point f a)
    Rational -> Point f a
    Point f a -> Point f a
    Point f a -> Point f a -> Point f a
    forall a.
    Num a =>
    (a -> a -> a) -> (a -> a) -> (Rational -> a) -> Fractional a
    forall (f :: Type -> Type) a. Fractional (f a) => Num (Point f a)
    forall (f :: Type -> Type) a.
    Fractional (f a) =>
    Rational -> Point f a
    forall (f :: Type -> Type) a.
    Fractional (f a) =>
    Point f a -> Point f a
    forall (f :: Type -> Type) a.
    Fractional (f a) =>
    Point f a -> Point f a -> Point f a
    $c/ :: forall (f :: Type -> Type) a.
    Fractional (f a) =>
    Point f a -> Point f a -> Point f a
    / :: Point f a -> Point f a -> Point f a
    $crecip :: forall (f :: Type -> Type) a.
    Fractional (f a) =>
    Point f a -> Point f a
    recip :: Point f a -> Point f a
    $cfromRational :: forall (f :: Type -> Type) a.
    Fractional (f a) =>
    Rational -> Point f a
    fromRational :: Rational -> Point f a
    Fractional , Integer -> Point f a
    Point f a -> Point f a
    Point f a -> Point f a -> Point f a
    (Point f a -> Point f a -> Point f a)
    -> (Point f a -> Point f a -> Point f a)
    -> (Point f a -> Point f a -> Point f a)
    -> (Point f a -> Point f a)
    -> (Point f a -> Point f a)
    -> (Point f a -> Point f a)
    -> (Integer -> Point f a)
    -> Num (Point f a)
    forall a.
    (a -> a -> a)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> (a -> a)
    -> (a -> a)
    -> (a -> a)
    -> (Integer -> a)
    -> Num a
    forall (f :: Type -> Type) a. Num (f a) => Integer -> Point f a
    forall (f :: Type -> Type) a. Num (f a) => Point f a -> Point f a
    forall (f :: Type -> Type) a.
    Num (f a) =>
    Point f a -> Point f a -> Point f a
    $c+ :: forall (f :: Type -> Type) a.
    Num (f a) =>
    Point f a -> Point f a -> Point f a
    + :: Point f a -> Point f a -> Point f a
    $c- :: forall (f :: Type -> Type) a.
    Num (f a) =>
    Point f a -> Point f a -> Point f a
    - :: Point f a -> Point f a -> Point f a
    $c* :: forall (f :: Type -> Type) a.
    Num (f a) =>
    Point f a -> Point f a -> Point f a
    * :: Point f a -> Point f a -> Point f a
    $cnegate :: forall (f :: Type -> Type) a. Num (f a) => Point f a -> Point f a
    negate :: Point f a -> Point f a
    $cabs :: forall (f :: Type -> Type) a. Num (f a) => Point f a -> Point f a
    abs :: Point f a -> Point f a
    $csignum :: forall (f :: Type -> Type) a. Num (f a) => Point f a -> Point f a
    signum :: Point f a -> Point f a
    $cfromInteger :: forall (f :: Type -> Type) a. Num (f a) => Integer -> Point f a
    fromInteger :: Integer -> Point f a
    Num, Ord (Point f a)
    Ord (Point f a) =>
    ((Point f a, Point f a) -> [Point f a])
    -> ((Point f a, Point f a) -> Point f a -> Int)
    -> ((Point f a, Point f a) -> Point f a -> Int)
    -> ((Point f a, Point f a) -> Point f a -> Bool)
    -> ((Point f a, Point f a) -> Int)
    -> ((Point f a, Point f a) -> Int)
    -> Ix (Point f a)
    (Point f a, Point f a) -> Int
    (Point f a, Point f a) -> [Point f a]
    (Point f a, Point f a) -> Point f a -> Bool
    (Point f a, Point f a) -> Point f 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 (f :: Type -> Type) a. Ix (f a) => Ord (Point f a)
    forall (f :: Type -> Type) a.
    Ix (f a) =>
    (Point f a, Point f a) -> Int
    forall (f :: Type -> Type) a.
    Ix (f a) =>
    (Point f a, Point f a) -> [Point f a]
    forall (f :: Type -> Type) a.
    Ix (f a) =>
    (Point f a, Point f a) -> Point f a -> Bool
    forall (f :: Type -> Type) a.
    Ix (f a) =>
    (Point f a, Point f a) -> Point f a -> Int
    $crange :: forall (f :: Type -> Type) a.
    Ix (f a) =>
    (Point f a, Point f a) -> [Point f a]
    range :: (Point f a, Point f a) -> [Point f a]
    $cindex :: forall (f :: Type -> Type) a.
    Ix (f a) =>
    (Point f a, Point f a) -> Point f a -> Int
    index :: (Point f a, Point f a) -> Point f a -> Int
    $cunsafeIndex :: forall (f :: Type -> Type) a.
    Ix (f a) =>
    (Point f a, Point f a) -> Point f a -> Int
    unsafeIndex :: (Point f a, Point f a) -> Point f a -> Int
    $cinRange :: forall (f :: Type -> Type) a.
    Ix (f a) =>
    (Point f a, Point f a) -> Point f a -> Bool
    inRange :: (Point f a, Point f a) -> Point f a -> Bool
    $crangeSize :: forall (f :: Type -> Type) a.
    Ix (f a) =>
    (Point f a, Point f a) -> Int
    rangeSize :: (Point f a, Point f a) -> Int
    $cunsafeRangeSize :: forall (f :: Type -> Type) a.
    Ix (f a) =>
    (Point f a, Point f a) -> Int
    unsafeRangeSize :: (Point f a, Point f a) -> Int
    Ix, Ptr (Point f a) -> IO (Point f a)
    Ptr (Point f a) -> Int -> IO (Point f a)
    Ptr (Point f a) -> Int -> Point f a -> IO ()
    Ptr (Point f a) -> Point f a -> IO ()
    Point f a -> Int
    (Point f a -> Int)
    -> (Point f a -> Int)
    -> (Ptr (Point f a) -> Int -> IO (Point f a))
    -> (Ptr (Point f a) -> Int -> Point f a -> IO ())
    -> (forall b. Ptr b -> Int -> IO (Point f a))
    -> (forall b. Ptr b -> Int -> Point f a -> IO ())
    -> (Ptr (Point f a) -> IO (Point f a))
    -> (Ptr (Point f a) -> Point f a -> IO ())
    -> Storable (Point f a)
    forall b. Ptr b -> Int -> IO (Point f a)
    forall b. Ptr b -> Int -> Point f a -> IO ()
    forall a.
    (a -> Int)
    -> (a -> Int)
    -> (Ptr a -> Int -> IO a)
    -> (Ptr a -> Int -> a -> IO ())
    -> (forall b. Ptr b -> Int -> IO a)
    -> (forall b. Ptr b -> Int -> a -> IO ())
    -> (Ptr a -> IO a)
    -> (Ptr a -> a -> IO ())
    -> Storable a
    forall (f :: Type -> Type) a.
    Storable (f a) =>
    Ptr (Point f a) -> IO (Point f a)
    forall (f :: Type -> Type) a.
    Storable (f a) =>
    Ptr (Point f a) -> Int -> IO (Point f a)
    forall (f :: Type -> Type) a.
    Storable (f a) =>
    Ptr (Point f a) -> Int -> Point f a -> IO ()
    forall (f :: Type -> Type) a.
    Storable (f a) =>
    Ptr (Point f a) -> Point f a -> IO ()
    forall (f :: Type -> Type) a. Storable (f a) => Point f a -> Int
    forall (f :: Type -> Type) a b.
    Storable (f a) =>
    Ptr b -> Int -> IO (Point f a)
    forall (f :: Type -> Type) a b.
    Storable (f a) =>
    Ptr b -> Int -> Point f a -> IO ()
    $csizeOf :: forall (f :: Type -> Type) a. Storable (f a) => Point f a -> Int
    sizeOf :: Point f a -> Int
    $calignment :: forall (f :: Type -> Type) a. Storable (f a) => Point f a -> Int
    alignment :: Point f a -> Int
    $cpeekElemOff :: forall (f :: Type -> Type) a.
    Storable (f a) =>
    Ptr (Point f a) -> Int -> IO (Point f a)
    peekElemOff :: Ptr (Point f a) -> Int -> IO (Point f a)
    $cpokeElemOff :: forall (f :: Type -> Type) a.
    Storable (f a) =>
    Ptr (Point f a) -> Int -> Point f a -> IO ()
    pokeElemOff :: Ptr (Point f a) -> Int -> Point f a -> IO ()
    $cpeekByteOff :: forall (f :: Type -> Type) a b.
    Storable (f a) =>
    Ptr b -> Int -> IO (Point f a)
    peekByteOff :: forall b. Ptr b -> Int -> IO (Point f a)
    $cpokeByteOff :: forall (f :: Type -> Type) a b.
    Storable (f a) =>
    Ptr b -> Int -> Point f a -> IO ()
    pokeByteOff :: forall b. Ptr b -> Int -> Point f a -> IO ()
    $cpeek :: forall (f :: Type -> Type) a.
    Storable (f a) =>
    Ptr (Point f a) -> IO (Point f a)
    peek :: Ptr (Point f a) -> IO (Point f a)
    $cpoke :: forall (f :: Type -> Type) a.
    Storable (f a) =>
    Ptr (Point f a) -> Point f a -> IO ()
    poke :: Ptr (Point f a) -> Point f a -> IO ()
    Storable, (forall x. Point f a -> Rep (Point f a) x)
    -> (forall x. Rep (Point f a) x -> Point f a)
    -> Generic (Point f a)
    forall x. Rep (Point f a) x -> Point f a
    forall x. Point f a -> Rep (Point f a) x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    forall (f :: Type -> Type) a x. Rep (Point f a) x -> Point f a
    forall (f :: Type -> Type) a x. Point f a -> Rep (Point f a) x
    $cfrom :: forall (f :: Type -> Type) a x. Point f a -> Rep (Point f a) x
    from :: forall x. Point f a -> Rep (Point f a) x
    $cto :: forall (f :: Type -> Type) a x. Rep (Point f a) x -> Point f a
    to :: forall x. Rep (Point f a) x -> Point f a
    Generic, (forall a. Point f a -> Rep1 (Point f) a)
    -> (forall a. Rep1 (Point f) a -> Point f a) -> Generic1 (Point f)
    forall a. Rep1 (Point f) a -> Point f a
    forall a. Point f a -> Rep1 (Point f) a
    forall k (f :: k -> Type).
    (forall (a :: k). f a -> Rep1 f a)
    -> (forall (a :: k). Rep1 f a -> f a) -> Generic1 f
    forall (f :: Type -> Type) a. Rep1 (Point f) a -> Point f a
    forall (f :: Type -> Type) a. Point f a -> Rep1 (Point f) a
    $cfrom1 :: forall (f :: Type -> Type) a. Point f a -> Rep1 (Point f) a
    from1 :: forall a. Point f a -> Rep1 (Point f) a
    $cto1 :: forall (f :: Type -> Type) a. Rep1 (Point f) a -> Point f a
    to1 :: forall a. Rep1 (Point f) a -> Point f a
    Generic1
               , Typeable, Typeable (Point f a)
    Typeable (Point f a) =>
    (forall (c :: Type -> Type).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> Point f a -> c (Point f a))
    -> (forall (c :: Type -> Type).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c (Point f a))
    -> (Point f a -> Constr)
    -> (Point f a -> DataType)
    -> (forall (t :: Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c (Point f a)))
    -> (forall (t :: Type -> Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c (Point f a)))
    -> ((forall b. Data b => b -> b) -> Point f a -> Point f a)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> Point f a -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> Point f a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> Point f a -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> Point f a -> u)
    -> (forall (m :: Type -> Type).
        Monad m =>
        (forall d. Data d => d -> m d) -> Point f a -> m (Point f a))
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Point f a -> m (Point f a))
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Point f a -> m (Point f a))
    -> Data (Point f a)
    Point f a -> Constr
    Point f a -> DataType
    (forall b. Data b => b -> b) -> Point f a -> Point f a
    forall a.
    Typeable a =>
    (forall (c :: Type -> Type).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: Type -> Type).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: Type -> Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: Type -> Type).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> Point f a -> u
    forall u. (forall d. Data d => d -> u) -> Point f a -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Point f a -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Point f a -> r
    forall (m :: Type -> Type).
    Monad m =>
    (forall d. Data d => d -> m d) -> Point f a -> m (Point f a)
    forall (m :: Type -> Type).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Point f a -> m (Point f a)
    forall (c :: Type -> Type).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Point f a)
    forall (c :: Type -> Type).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Point f a -> c (Point f a)
    forall (f :: Type -> Type) a.
    (Typeable f, Typeable a, Data (f a)) =>
    Typeable (Point f a)
    forall (f :: Type -> Type) a.
    (Typeable f, Typeable a, Data (f a)) =>
    Point f a -> Constr
    forall (f :: Type -> Type) a.
    (Typeable f, Typeable a, Data (f a)) =>
    Point f a -> DataType
    forall (f :: Type -> Type) a.
    (Typeable f, Typeable a, Data (f a)) =>
    (forall b. Data b => b -> b) -> Point f a -> Point f a
    forall (f :: Type -> Type) a u.
    (Typeable f, Typeable a, Data (f a)) =>
    Int -> (forall d. Data d => d -> u) -> Point f a -> u
    forall (f :: Type -> Type) a u.
    (Typeable f, Typeable a, Data (f a)) =>
    (forall d. Data d => d -> u) -> Point f a -> [u]
    forall (f :: Type -> Type) a r r'.
    (Typeable f, Typeable a, Data (f a)) =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Point f a -> r
    forall (f :: Type -> Type) a r r'.
    (Typeable f, Typeable a, Data (f a)) =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Point f a -> r
    forall (f :: Type -> Type) a (m :: Type -> Type).
    (Typeable f, Typeable a, Data (f a), Monad m) =>
    (forall d. Data d => d -> m d) -> Point f a -> m (Point f a)
    forall (f :: Type -> Type) a (m :: Type -> Type).
    (Typeable f, Typeable a, Data (f a), MonadPlus m) =>
    (forall d. Data d => d -> m d) -> Point f a -> m (Point f a)
    forall (f :: Type -> Type) a (c :: Type -> Type).
    (Typeable f, Typeable a, Data (f a)) =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Point f a)
    forall (f :: Type -> Type) a (c :: Type -> Type).
    (Typeable f, Typeable a, Data (f a)) =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Point f a -> c (Point f a)
    forall (f :: Type -> Type) a (t :: Type -> Type)
           (c :: Type -> Type).
    (Typeable f, Typeable a, Data (f a), Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (Point f a))
    forall (f :: Type -> Type) a (t :: Type -> Type -> Type)
           (c :: Type -> Type).
    (Typeable f, Typeable a, Data (f a), Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (Point f a))
    forall (t :: Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (Point f a))
    forall (t :: Type -> Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (Point f a))
    $cgfoldl :: forall (f :: Type -> Type) a (c :: Type -> Type).
    (Typeable f, Typeable a, Data (f a)) =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Point f a -> c (Point f a)
    gfoldl :: forall (c :: Type -> Type).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Point f a -> c (Point f a)
    $cgunfold :: forall (f :: Type -> Type) a (c :: Type -> Type).
    (Typeable f, Typeable a, Data (f a)) =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Point f a)
    gunfold :: forall (c :: Type -> Type).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Point f a)
    $ctoConstr :: forall (f :: Type -> Type) a.
    (Typeable f, Typeable a, Data (f a)) =>
    Point f a -> Constr
    toConstr :: Point f a -> Constr
    $cdataTypeOf :: forall (f :: Type -> Type) a.
    (Typeable f, Typeable a, Data (f a)) =>
    Point f a -> DataType
    dataTypeOf :: Point f a -> DataType
    $cdataCast1 :: forall (f :: Type -> Type) a (t :: Type -> Type)
           (c :: Type -> Type).
    (Typeable f, Typeable a, Data (f a), Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (Point f a))
    dataCast1 :: forall (t :: Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (Point f a))
    $cdataCast2 :: forall (f :: Type -> Type) a (t :: Type -> Type -> Type)
           (c :: Type -> Type).
    (Typeable f, Typeable a, Data (f a), Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (Point f a))
    dataCast2 :: forall (t :: Type -> Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (Point f a))
    $cgmapT :: forall (f :: Type -> Type) a.
    (Typeable f, Typeable a, Data (f a)) =>
    (forall b. Data b => b -> b) -> Point f a -> Point f a
    gmapT :: (forall b. Data b => b -> b) -> Point f a -> Point f a
    $cgmapQl :: forall (f :: Type -> Type) a r r'.
    (Typeable f, Typeable a, Data (f a)) =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Point f a -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Point f a -> r
    $cgmapQr :: forall (f :: Type -> Type) a r r'.
    (Typeable f, Typeable a, Data (f a)) =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Point f a -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Point f a -> r
    $cgmapQ :: forall (f :: Type -> Type) a u.
    (Typeable f, Typeable a, Data (f a)) =>
    (forall d. Data d => d -> u) -> Point f a -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> Point f a -> [u]
    $cgmapQi :: forall (f :: Type -> Type) a u.
    (Typeable f, Typeable a, Data (f a)) =>
    Int -> (forall d. Data d => d -> u) -> Point f a -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Point f a -> u
    $cgmapM :: forall (f :: Type -> Type) a (m :: Type -> Type).
    (Typeable f, Typeable a, Data (f a), Monad m) =>
    (forall d. Data d => d -> m d) -> Point f a -> m (Point f a)
    gmapM :: forall (m :: Type -> Type).
    Monad m =>
    (forall d. Data d => d -> m d) -> Point f a -> m (Point f a)
    $cgmapMp :: forall (f :: Type -> Type) a (m :: Type -> Type).
    (Typeable f, Typeable a, Data (f a), MonadPlus m) =>
    (forall d. Data d => d -> m d) -> Point f a -> m (Point f a)
    gmapMp :: forall (m :: Type -> Type).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Point f a -> m (Point f a)
    $cgmapMo :: forall (f :: Type -> Type) a (m :: Type -> Type).
    (Typeable f, Typeable a, Data (f a), MonadPlus m) =>
    (forall d. Data d => d -> m d) -> Point f a -> m (Point f a)
    gmapMo :: forall (m :: Type -> Type).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Point f a -> m (Point f a)
    Data
               )

    data instance U.Vector    (Point f a) =  V_P !(U.Vector    (f a))
    data instance U.MVector s (Point f a) = MV_P !(U.MVector s (f a))
    instance U.Unbox (f a) => U.Unbox (Point f a)

    instance U.Unbox (f a) => M.MVector U.MVector (Point f a) where
      {-# INLINE basicLength #-}
      {-# INLINE basicUnsafeSlice #-}
      {-# INLINE basicOverlaps #-}
      {-# INLINE basicUnsafeNew #-}
      {-# INLINE basicUnsafeRead #-}
      {-# INLINE basicUnsafeWrite #-}
      basicLength :: forall s. MVector s (Point f a) -> Int
    basicLength (MV_P MVector s (f a)
    v) = MVector s (f a) -> Int
    forall s. MVector s (f a) -> Int
    forall (v :: Type -> Type -> Type) a s. MVector v a => v s a -> Int
    M.basicLength MVector s (f a)
    v
      basicUnsafeSlice :: forall s.
    Int -> Int -> MVector s (Point f a) -> MVector s (Point f a)
    basicUnsafeSlice Int
    m Int
    n (MV_P MVector s (f a)
    v) = MVector s (f a) -> MVector s (Point f a)
    forall s (f :: Type -> Type) a.
    MVector s (f a) -> MVector s (Point f a)
    MV_P (Int -> Int -> MVector s (f a) -> MVector s (f a)
    forall s. Int -> Int -> MVector s (f a) -> MVector s (f a)
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    Int -> Int -> v s a -> v s a
    M.basicUnsafeSlice Int
    m Int
    n MVector s (f a)
    v)
      basicOverlaps :: forall s. MVector s (Point f a) -> MVector s (Point f a) -> Bool
    basicOverlaps (MV_P MVector s (f a)
    v) (MV_P MVector s (f a)
    u) = MVector s (f a) -> MVector s (f a) -> Bool
    forall s. MVector s (f a) -> MVector s (f a) -> Bool
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> v s a -> Bool
    M.basicOverlaps MVector s (f a)
    v MVector s (f a)
    u
      basicUnsafeNew :: forall s. Int -> ST s (MVector s (Point f a))
    basicUnsafeNew Int
    n = MVector s (f a) -> MVector s (Point f a)
    forall s (f :: Type -> Type) a.
    MVector s (f a) -> MVector s (Point f a)
    MV_P (MVector s (f a) -> MVector s (Point f a))
    -> ST s (MVector s (f a)) -> ST s (MVector s (Point f a))
    forall (m :: Type -> Type) a1 r.
    Monad m =>
    (a1 -> r) -> m a1 -> m r
    `liftM` Int -> ST s (MVector s (f a))
    forall s. Int -> ST s (MVector s (f a))
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    Int -> ST s (v s a)
    M.basicUnsafeNew Int
    n
      basicUnsafeRead :: forall s. MVector s (Point f a) -> Int -> ST s (Point f a)
    basicUnsafeRead (MV_P MVector s (f a)
    v) Int
    i = f a -> Point f a
    forall (f :: Type -> Type) a. f a -> Point f a
    P (f a -> Point f a) -> ST s (f a) -> ST s (Point f a)
    forall (m :: Type -> Type) a1 r.
    Monad m =>
    (a1 -> r) -> m a1 -> m r
    `liftM` MVector s (f a) -> Int -> ST s (f a)
    forall s. MVector s (f a) -> Int -> ST s (f a)
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> ST s a
    M.basicUnsafeRead MVector s (f a)
    v Int
    i
      basicUnsafeWrite :: forall s. MVector s (Point f a) -> Int -> Point f a -> ST s ()
    basicUnsafeWrite (MV_P MVector s (f a)
    v) Int
    i (P f a
    x) = MVector s (f a) -> Int -> f a -> ST s ()
    forall s. MVector s (f a) -> Int -> f a -> ST s ()
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> a -> ST s ()
    M.basicUnsafeWrite MVector s (f a)
    v Int
    i f a
    x
    #if MIN_VERSION_vector(0,11,0)
      basicInitialize :: forall s. MVector s (Point f a) -> ST s ()
    basicInitialize (MV_P MVector s (f a)
    v) = MVector s (f a) -> ST s ()
    forall s. MVector s (f a) -> ST s ()
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> ST s ()
    M.basicInitialize MVector s (f a)
    v
      {-# INLINE basicInitialize #-}
    #endif

    instance U.Unbox (f a) => G.Vector U.Vector (Point f a) where
      {-# INLINE basicUnsafeFreeze #-}
      {-# INLINE basicUnsafeThaw   #-}
      {-# INLINE basicLength       #-}
      {-# INLINE basicUnsafeSlice  #-}
      {-# INLINE basicUnsafeIndexM #-}
      basicUnsafeFreeze :: forall s. Mutable Vector s (Point f a) -> ST s (Vector (Point f a))
    basicUnsafeFreeze (MV_P MVector s (f a)
    v) = Vector (f a) -> Vector (Point f a)
    forall (f :: Type -> Type) a. Vector (f a) -> Vector (Point f a)
    V_P (Vector (f a) -> Vector (Point f a))
    -> ST s (Vector (f a)) -> ST s (Vector (Point f a))
    forall (m :: Type -> Type) a1 r.
    Monad m =>
    (a1 -> r) -> m a1 -> m r
    `liftM` Mutable Vector s (f a) -> ST s (Vector (f a))
    forall s. Mutable Vector s (f a) -> ST s (Vector (f a))
    forall (v :: Type -> Type) a s.
    Vector v a =>
    Mutable v s a -> ST s (v a)
    G.basicUnsafeFreeze MVector s (f a)
    Mutable Vector s (f a)
    v
      basicUnsafeThaw :: forall s. Vector (Point f a) -> ST s (Mutable Vector s (Point f a))
    basicUnsafeThaw   ( V_P Vector (f a)
    v) = MVector s (f a) -> MVector s (Point f a)
    forall s (f :: Type -> Type) a.
    MVector s (f a) -> MVector s (Point f a)
    MV_P (MVector s (f a) -> MVector s (Point f a))
    -> ST s (MVector s (f a)) -> ST s (MVector s (Point f a))
    forall (m :: Type -> Type) a1 r.
    Monad m =>
    (a1 -> r) -> m a1 -> m r
    `liftM` Vector (f a) -> ST s (Mutable Vector s (f a))
    forall s. Vector (f a) -> ST s (Mutable Vector s (f a))
    forall (v :: Type -> Type) a s.
    Vector v a =>
    v a -> ST s (Mutable v s a)
    G.basicUnsafeThaw   Vector (f a)
    v
      basicLength :: Vector (Point f a) -> Int
    basicLength       ( V_P Vector (f a)
    v) = Vector (f a) -> Int
    forall (v :: Type -> Type) a. Vector v a => v a -> Int
    G.basicLength Vector (f a)
    v
      basicUnsafeSlice :: Int -> Int -> Vector (Point f a) -> Vector (Point f a)
    basicUnsafeSlice Int
    m Int
    n (V_P Vector (f a)
    v) = Vector (f a) -> Vector (Point f a)
    forall (f :: Type -> Type) a. Vector (f a) -> Vector (Point f a)
    V_P (Int -> Int -> Vector (f a) -> Vector (f a)
    forall (v :: Type -> Type) a.
    Vector v a =>
    Int -> Int -> v a -> v a
    G.basicUnsafeSlice Int
    m Int
    n Vector (f a)
    v)
      basicUnsafeIndexM :: Vector (Point f a) -> Int -> Box (Point f a)
    basicUnsafeIndexM (V_P Vector (f a)
    v) Int
    i = f a -> Point f a
    forall (f :: Type -> Type) a. f a -> Point f a
    P (f a -> Point f a) -> Box (f a) -> Box (Point f a)
    forall (m :: Type -> Type) a1 r.
    Monad m =>
    (a1 -> r) -> m a1 -> m r
    `liftM` Vector (f a) -> Int -> Box (f a)
    forall (v :: Type -> Type) a. Vector v a => v a -> Int -> Box a
    G.basicUnsafeIndexM Vector (f a)
    v Int
    i

    -- | A 2-dimensional vector
    --
    -- >>> pure 1 :: V2 Int
    -- V2 1 1
    --
    -- >>> V2 1 2 + V2 3 4
    -- V2 4 6
    --
    -- >>> V2 1 2 * V2 3 4
    -- V2 3 8
    --
    -- >>> sum (V2 1 2)
    -- 3
    data V2 a = V2 !a !a
      deriving (V2 a -> V2 a -> Bool
    (V2 a -> V2 a -> Bool) -> (V2 a -> V2 a -> Bool) -> Eq (V2 a)
    forall a. Eq a => V2 a -> V2 a -> Bool
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: forall a. Eq a => V2 a -> V2 a -> Bool
    == :: V2 a -> V2 a -> Bool
    $c/= :: forall a. Eq a => V2 a -> V2 a -> Bool
    /= :: V2 a -> V2 a -> Bool
    Eq, Eq (V2 a)
    Eq (V2 a) =>
    (V2 a -> V2 a -> Ordering)
    -> (V2 a -> V2 a -> Bool)
    -> (V2 a -> V2 a -> Bool)
    -> (V2 a -> V2 a -> Bool)
    -> (V2 a -> V2 a -> Bool)
    -> (V2 a -> V2 a -> V2 a)
    -> (V2 a -> V2 a -> V2 a)
    -> Ord (V2 a)
    V2 a -> V2 a -> Bool
    V2 a -> V2 a -> Ordering
    V2 a -> V2 a -> V2 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 (V2 a)
    forall a. Ord a => V2 a -> V2 a -> Bool
    forall a. Ord a => V2 a -> V2 a -> Ordering
    forall a. Ord a => V2 a -> V2 a -> V2 a
    $ccompare :: forall a. Ord a => V2 a -> V2 a -> Ordering
    compare :: V2 a -> V2 a -> Ordering
    $c< :: forall a. Ord a => V2 a -> V2 a -> Bool
    < :: V2 a -> V2 a -> Bool
    $c<= :: forall a. Ord a => V2 a -> V2 a -> Bool
    <= :: V2 a -> V2 a -> Bool
    $c> :: forall a. Ord a => V2 a -> V2 a -> Bool
    > :: V2 a -> V2 a -> Bool
    $c>= :: forall a. Ord a => V2 a -> V2 a -> Bool
    >= :: V2 a -> V2 a -> Bool
    $cmax :: forall a. Ord a => V2 a -> V2 a -> V2 a
    max :: V2 a -> V2 a -> V2 a
    $cmin :: forall a. Ord a => V2 a -> V2 a -> V2 a
    min :: V2 a -> V2 a -> V2 a
    Ord, Int -> V2 a -> ShowS
    [V2 a] -> ShowS
    V2 a -> String
    (Int -> V2 a -> ShowS)
    -> (V2 a -> String) -> ([V2 a] -> ShowS) -> Show (V2 a)
    forall a. Show a => Int -> V2 a -> ShowS
    forall a. Show a => [V2 a] -> ShowS
    forall a. Show a => V2 a -> String
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: forall a. Show a => Int -> V2 a -> ShowS
    showsPrec :: Int -> V2 a -> ShowS
    $cshow :: forall a. Show a => V2 a -> String
    show :: V2 a -> String
    $cshowList :: forall a. Show a => [V2 a] -> ShowS
    showList :: [V2 a] -> ShowS
    Show, ReadPrec [V2 a]
    ReadPrec (V2 a)
    Int -> ReadS (V2 a)
    ReadS [V2 a]
    (Int -> ReadS (V2 a))
    -> ReadS [V2 a]
    -> ReadPrec (V2 a)
    -> ReadPrec [V2 a]
    -> Read (V2 a)
    forall a. Read a => ReadPrec [V2 a]
    forall a. Read a => ReadPrec (V2 a)
    forall a. Read a => Int -> ReadS (V2 a)
    forall a. Read a => ReadS [V2 a]
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: forall a. Read a => Int -> ReadS (V2 a)
    readsPrec :: Int -> ReadS (V2 a)
    $creadList :: forall a. Read a => ReadS [V2 a]
    readList :: ReadS [V2 a]
    $creadPrec :: forall a. Read a => ReadPrec (V2 a)
    readPrec :: ReadPrec (V2 a)
    $creadListPrec :: forall a. Read a => ReadPrec [V2 a]
    readListPrec :: ReadPrec [V2 a]
    Read, Typeable (V2 a)
    Typeable (V2 a) =>
    (forall (c :: Type -> Type).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> V2 a -> c (V2 a))
    -> (forall (c :: Type -> Type).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c (V2 a))
    -> (V2 a -> Constr)
    -> (V2 a -> DataType)
    -> (forall (t :: Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c (V2 a)))
    -> (forall (t :: Type -> Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V2 a)))
    -> ((forall b. Data b => b -> b) -> V2 a -> V2 a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V2 a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V2 a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> V2 a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> V2 a -> u)
    -> (forall (m :: Type -> Type).
        Monad m =>
        (forall d. Data d => d -> m d) -> V2 a -> m (V2 a))
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> V2 a -> m (V2 a))
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> V2 a -> m (V2 a))
    -> Data (V2 a)
    V2 a -> Constr
    V2 a -> DataType
    (forall b. Data b => b -> b) -> V2 a -> V2 a
    forall a. Data a => Typeable (V2 a)
    forall a. Data a => V2 a -> Constr
    forall a. Data a => V2 a -> DataType
    forall a. Data a => (forall b. Data b => b -> b) -> V2 a -> V2 a
    forall a u.
    Data a =>
    Int -> (forall d. Data d => d -> u) -> V2 a -> u
    forall a u. Data a => (forall d. Data d => d -> u) -> V2 a -> [u]
    forall a r r'.
    Data a =>
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V2 a -> r
    forall a r r'.
    Data a =>
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V2 a -> r
    forall a (m :: Type -> Type).
    (Data a, Monad m) =>
    (forall d. Data d => d -> m d) -> V2 a -> m (V2 a)
    forall a (m :: Type -> Type).
    (Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> V2 a -> m (V2 a)
    forall a (c :: Type -> Type).
    Data a =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (V2 a)
    forall a (c :: Type -> Type).
    Data a =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> V2 a -> c (V2 a)
    forall a (t :: Type -> Type) (c :: Type -> Type).
    (Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (V2 a))
    forall a (t :: Type -> Type -> Type) (c :: Type -> Type).
    (Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V2 a))
    forall a.
    Typeable a =>
    (forall (c :: Type -> Type).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: Type -> Type).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: Type -> Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: Type -> Type).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> V2 a -> u
    forall u. (forall d. Data d => d -> u) -> V2 a -> [u]
    forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V2 a -> r
    forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V2 a -> r
    forall (m :: Type -> Type).
    Monad m =>
    (forall d. Data d => d -> m d) -> V2 a -> m (V2 a)
    forall (m :: Type -> Type).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> V2 a -> m (V2 a)
    forall (c :: Type -> Type).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (V2 a)
    forall (c :: Type -> Type).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> V2 a -> c (V2 a)
    forall (t :: Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (V2 a))
    forall (t :: Type -> Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V2 a))
    $cgfoldl :: forall a (c :: Type -> Type).
    Data a =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> V2 a -> c (V2 a)
    gfoldl :: forall (c :: Type -> Type).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> V2 a -> c (V2 a)
    $cgunfold :: forall a (c :: Type -> Type).
    Data a =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (V2 a)
    gunfold :: forall (c :: Type -> Type).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (V2 a)
    $ctoConstr :: forall a. Data a => V2 a -> Constr
    toConstr :: V2 a -> Constr
    $cdataTypeOf :: forall a. Data a => V2 a -> DataType
    dataTypeOf :: V2 a -> DataType
    $cdataCast1 :: forall a (t :: Type -> Type) (c :: Type -> Type).
    (Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (V2 a))
    dataCast1 :: forall (t :: Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (V2 a))
    $cdataCast2 :: forall a (t :: Type -> Type -> Type) (c :: Type -> Type).
    (Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V2 a))
    dataCast2 :: forall (t :: Type -> Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V2 a))
    $cgmapT :: forall a. Data a => (forall b. Data b => b -> b) -> V2 a -> V2 a
    gmapT :: (forall b. Data b => b -> b) -> V2 a -> V2 a
    $cgmapQl :: forall a r r'.
    Data a =>
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V2 a -> r
    gmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V2 a -> r
    $cgmapQr :: forall a r r'.
    Data a =>
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V2 a -> r
    gmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V2 a -> r
    $cgmapQ :: forall a u. Data a => (forall d. Data d => d -> u) -> V2 a -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> V2 a -> [u]
    $cgmapQi :: forall a u.
    Data a =>
    Int -> (forall d. Data d => d -> u) -> V2 a -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> V2 a -> u
    $cgmapM :: forall a (m :: Type -> Type).
    (Data a, Monad m) =>
    (forall d. Data d => d -> m d) -> V2 a -> m (V2 a)
    gmapM :: forall (m :: Type -> Type).
    Monad m =>
    (forall d. Data d => d -> m d) -> V2 a -> m (V2 a)
    $cgmapMp :: forall a (m :: Type -> Type).
    (Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> V2 a -> m (V2 a)
    gmapMp :: forall (m :: Type -> Type).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> V2 a -> m (V2 a)
    $cgmapMo :: forall a (m :: Type -> Type).
    (Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> V2 a -> m (V2 a)
    gmapMo :: forall (m :: Type -> Type).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> V2 a -> m (V2 a)
    Data, Typeable, (forall x. V2 a -> Rep (V2 a) x)
    -> (forall x. Rep (V2 a) x -> V2 a) -> Generic (V2 a)
    forall x. Rep (V2 a) x -> V2 a
    forall x. V2 a -> Rep (V2 a) x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    forall a x. Rep (V2 a) x -> V2 a
    forall a x. V2 a -> Rep (V2 a) x
    $cfrom :: forall a x. V2 a -> Rep (V2 a) x
    from :: forall x. V2 a -> Rep (V2 a) x
    $cto :: forall a x. Rep (V2 a) x -> V2 a
    to :: forall x. Rep (V2 a) x -> V2 a
    Generic, (forall a. V2 a -> Rep1 V2 a)
    -> (forall a. Rep1 V2 a -> V2 a) -> Generic1 V2
    forall a. Rep1 V2 a -> V2 a
    forall a. V2 a -> Rep1 V2 a
    forall k (f :: k -> Type).
    (forall (a :: k). f a -> Rep1 f a)
    -> (forall (a :: k). Rep1 f a -> f a) -> Generic1 f
    $cfrom1 :: forall a. V2 a -> Rep1 V2 a
    from1 :: forall a. V2 a -> Rep1 V2 a
    $cto1 :: forall a. Rep1 V2 a -> V2 a
    to1 :: forall a. Rep1 V2 a -> V2 a
    Generic1)

    instance Functor V2 where
      fmap :: forall a b. (a -> b) -> V2 a -> V2 b
    fmap a -> b
    f (V2 a
    a a
    b) = b -> b -> V2 b
    forall a. a -> a -> V2 a
    V2 (a -> b
    f a
    a) (a -> b
    f a
    b)
      {-# INLINE fmap #-}
      a
    a <$ :: forall a b. a -> V2 b -> V2 a
    <$ V2 b
    _ = a -> a -> V2 a
    forall a. a -> a -> V2 a
    V2 a
    a a
    a
      {-# INLINE (<$) #-}

    instance Foldable V2 where
      foldMap :: forall m a. Monoid m => (a -> m) -> V2 a -> m
    foldMap a -> m
    f (V2 a
    a a
    b) = a -> m
    f a
    a m -> m -> m
    forall a. Monoid a => a -> a -> a
    `mappend` a -> m
    f a
    b
      {-# INLINE foldMap #-}

    instance Traversable V2 where
      traverse :: forall (f :: Type -> Type) a b.
    Applicative f =>
    (a -> f b) -> V2 a -> f (V2 b)
    traverse a -> f b
    f (V2 a
    a a
    b) = b -> b -> V2 b
    forall a. a -> a -> V2 a
    V2 (b -> b -> V2 b) -> f b -> f (b -> V2 b)
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    <$> a -> f b
    f a
    a f (b -> V2 b) -> f b -> f (V2 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: Type -> Type) a b.
    Applicative f =>
    f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    b
      {-# INLINE traverse #-}

    instance Applicative V2 where
      pure :: forall a. a -> V2 a
    pure a
    a = a -> a -> V2 a
    forall a. a -> a -> V2 a
    V2 a
    a a
    a
      {-# INLINE pure #-}
      V2 a -> b
    a a -> b
    b <*> :: forall a b. V2 (a -> b) -> V2 a -> V2 b
    <*> V2 a
    d a
    e = b -> b -> V2 b
    forall a. a -> a -> V2 a
    V2 (a -> b
    a a
    d) (a -> b
    b a
    e)
      {-# INLINE (<*>) #-}

    instance Monad V2 where
      return :: forall a. a -> V2 a
    return = a -> V2 a
    forall a. a -> V2 a
    forall (f :: Type -> Type) a. Applicative f => a -> f a
    pure
      {-# INLINE return #-}
      V2 a
    a a
    b >>= :: forall a b. V2 a -> (a -> V2 b) -> V2 b
    >>= a -> V2 b
    f = b -> b -> V2 b
    forall a. a -> a -> V2 a
    V2 b
    a' b
    b' where
        V2 b
    a' b
    _ = a -> V2 b
    f a
    a
        V2 b
    _ b
    b' = a -> V2 b
    f a
    b
      {-# INLINE (>>=) #-}

    instance Num a => Num (V2 a) where
      + :: V2 a -> V2 a -> V2 a
    (+) = (a -> a -> a) -> V2 a -> V2 a -> V2 a
    forall a b c. (a -> b -> c) -> V2 a -> V2 b -> V2 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2 a -> a -> a
    forall a. Num a => a -> a -> a
    (+)
      {-# INLINE (+) #-}
      (-) = (a -> a -> a) -> V2 a -> V2 a -> V2 a
    forall a b c. (a -> b -> c) -> V2 a -> V2 b -> V2 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2 (-)
      {-# INLINE (-) #-}
      * :: V2 a -> V2 a -> V2 a
    (*) = (a -> a -> a) -> V2 a -> V2 a -> V2 a
    forall a b c. (a -> b -> c) -> V2 a -> V2 b -> V2 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2 a -> a -> a
    forall a. Num a => a -> a -> a
    (*)
      {-# INLINE (*) #-}
      negate :: V2 a -> V2 a
    negate = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Num a => a -> a
    negate
      {-# INLINE negate #-}
      abs :: V2 a -> V2 a
    abs = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Num a => a -> a
    abs
      {-# INLINE abs #-}
      signum :: V2 a -> V2 a
    signum = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Num a => a -> a
    signum
      {-# INLINE signum #-}
      fromInteger :: Integer -> V2 a
    fromInteger = a -> V2 a
    forall a. a -> V2 a
    forall (f :: Type -> Type) a. Applicative f => a -> f a
    pure (a -> V2 a) -> (Integer -> a) -> Integer -> V2 a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Integer -> a
    forall a. Num a => Integer -> a
    fromInteger
      {-# INLINE fromInteger #-}

    instance Fractional a => Fractional (V2 a) where
      recip :: V2 a -> V2 a
    recip = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Fractional a => a -> a
    recip
      {-# INLINE recip #-}
      / :: V2 a -> V2 a -> V2 a
    (/) = (a -> a -> a) -> V2 a -> V2 a -> V2 a
    forall a b c. (a -> b -> c) -> V2 a -> V2 b -> V2 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2 a -> a -> a
    forall a. Fractional a => a -> a -> a
    (/)
      {-# INLINE (/) #-}
      fromRational :: Rational -> V2 a
    fromRational = a -> V2 a
    forall a. a -> V2 a
    forall (f :: Type -> Type) a. Applicative f => a -> f a
    pure (a -> V2 a) -> (Rational -> a) -> Rational -> V2 a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Rational -> a
    forall a. Fractional a => Rational -> a
    fromRational
      {-# INLINE fromRational #-}

    instance Floating a => Floating (V2 a) where
        pi :: V2 a
    pi = a -> V2 a
    forall a. a -> V2 a
    forall (f :: Type -> Type) a. Applicative f => a -> f a
    pure a
    forall a. Floating a => a
    pi
        {-# INLINE pi #-}
        exp :: V2 a -> V2 a
    exp = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    exp
        {-# INLINE exp #-}
        sqrt :: V2 a -> V2 a
    sqrt = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    sqrt
        {-# INLINE sqrt #-}
        log :: V2 a -> V2 a
    log = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    log
        {-# INLINE log #-}
        ** :: V2 a -> V2 a -> V2 a
    (**) = (a -> a -> a) -> V2 a -> V2 a -> V2 a
    forall a b c. (a -> b -> c) -> V2 a -> V2 b -> V2 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2 a -> a -> a
    forall a. Floating a => a -> a -> a
    (**)
        {-# INLINE (**) #-}
        logBase :: V2 a -> V2 a -> V2 a
    logBase = (a -> a -> a) -> V2 a -> V2 a -> V2 a
    forall a b c. (a -> b -> c) -> V2 a -> V2 b -> V2 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2 a -> a -> a
    forall a. Floating a => a -> a -> a
    logBase
        {-# INLINE logBase #-}
        sin :: V2 a -> V2 a
    sin = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    sin
        {-# INLINE sin #-}
        tan :: V2 a -> V2 a
    tan = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    tan
        {-# INLINE tan #-}
        cos :: V2 a -> V2 a
    cos = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    cos
        {-# INLINE cos #-}
        asin :: V2 a -> V2 a
    asin = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    asin
        {-# INLINE asin #-}
        atan :: V2 a -> V2 a
    atan = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    atan
        {-# INLINE atan #-}
        acos :: V2 a -> V2 a
    acos = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    acos
        {-# INLINE acos #-}
        sinh :: V2 a -> V2 a
    sinh = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    sinh
        {-# INLINE sinh #-}
        tanh :: V2 a -> V2 a
    tanh = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    tanh
        {-# INLINE tanh #-}
        cosh :: V2 a -> V2 a
    cosh = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    cosh
        {-# INLINE cosh #-}
        asinh :: V2 a -> V2 a
    asinh = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    asinh
        {-# INLINE asinh #-}
        atanh :: V2 a -> V2 a
    atanh = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    atanh
        {-# INLINE atanh #-}
        acosh :: V2 a -> V2 a
    acosh = (a -> a) -> V2 a -> V2 a
    forall a b. (a -> b) -> V2 a -> V2 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    acosh
        {-# INLINE acosh #-}

    instance Storable a => Storable (V2 a) where
      sizeOf :: V2 a -> Int
    sizeOf V2 a
    _ = Int
    2 Int -> Int -> Int
    forall a. Num a => a -> a -> a
    * a -> Int
    forall a. Storable a => a -> Int
    sizeOf (a
    forall a. HasCallStack => a
    undefined::a)
      {-# INLINE sizeOf #-}
      alignment :: V2 a -> Int
    alignment V2 a
    _ = a -> Int
    forall a. Storable a => a -> Int
    alignment (a
    forall a. HasCallStack => a
    undefined::a)
      {-# INLINE alignment #-}
      poke :: Ptr (V2 a) -> V2 a -> IO ()
    poke Ptr (V2 a)
    ptr (V2 a
    x a
    y) = Ptr a -> a -> IO ()
    forall a. Storable a => Ptr a -> a -> IO ()
    poke Ptr a
    ptr' a
    x IO () -> IO () -> IO ()
    forall a b. IO a -> IO b -> IO b
    forall (m :: Type -> Type) a b. Monad m => m a -> m b -> m b
    >> Ptr a -> Int -> a -> IO ()
    forall a. Storable a => Ptr a -> Int -> a -> IO ()
    pokeElemOff Ptr a
    ptr' Int
    1 a
    y
        where ptr' :: Ptr a
    ptr' = Ptr (V2 a) -> Ptr a
    forall a b. Ptr a -> Ptr b
    castPtr Ptr (V2 a)
    ptr
      {-# INLINE poke #-}
      peek :: Ptr (V2 a) -> IO (V2 a)
    peek Ptr (V2 a)
    ptr = a -> a -> V2 a
    forall a. a -> a -> V2 a
    V2 (a -> a -> V2 a) -> IO a -> IO (a -> V2 a)
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    <$> Ptr a -> IO a
    forall a. Storable a => Ptr a -> IO a
    peek Ptr a
    ptr' IO (a -> V2 a) -> IO a -> IO (V2 a)
    forall a b. IO (a -> b) -> IO a -> IO b
    forall (f :: Type -> Type) a b.
    Applicative f =>
    f (a -> b) -> f a -> f b
    <*> Ptr a -> Int -> IO a
    forall a. Storable a => Ptr a -> Int -> IO a
    peekElemOff Ptr a
    ptr' Int
    1
        where ptr' :: Ptr a
    ptr' = Ptr (V2 a) -> Ptr a
    forall a b. Ptr a -> Ptr b
    castPtr Ptr (V2 a)
    ptr
      {-# INLINE peek #-}

    instance Ix a => Ix (V2 a) where
      {-# SPECIALISE instance Ix (V2 Int) #-}

      range :: (V2 a, V2 a) -> [V2 a]
    range (V2 a
    l1 a
    l2,V2 a
    u1 a
    u2) =
        [ a -> a -> V2 a
    forall a. a -> a -> V2 a
    V2 a
    i1 a
    i2 | a
    i1 <- (a, a) -> [a]
    forall a. Ix a => (a, a) -> [a]
    range (a
    l1,a
    u1), a
    i2 <- (a, a) -> [a]
    forall a. Ix a => (a, a) -> [a]
    range (a
    l2,a
    u2) ]
      {-# INLINE range #-}

      unsafeIndex :: (V2 a, V2 a) -> V2 a -> Int
    unsafeIndex (V2 a
    l1 a
    l2,V2 a
    u1 a
    u2) (V2 a
    i1 a
    i2) =
        (a, a) -> a -> Int
    forall a. Ix a => (a, a) -> a -> Int
    unsafeIndex (a
    l1,a
    u1) a
    i1 Int -> Int -> Int
    forall a. Num a => a -> a -> a
    * (a, a) -> Int
    forall a. Ix a => (a, a) -> Int
    unsafeRangeSize (a
    l2,a
    u2) Int -> Int -> Int
    forall a. Num a => a -> a -> a
    + (a, a) -> a -> Int
    forall a. Ix a => (a, a) -> a -> Int
    unsafeIndex (a
    l2,a
    u2) a
    i2
      {-# INLINE unsafeIndex #-}

      inRange :: (V2 a, V2 a) -> V2 a -> Bool
    inRange (V2 a
    l1 a
    l2,V2 a
    u1 a
    u2) (V2 a
    i1 a
    i2) =
        (a, a) -> a -> Bool
    forall a. Ix a => (a, a) -> a -> Bool
    inRange (a
    l1,a
    u1) a
    i1 Bool -> Bool -> Bool
    && (a, a) -> a -> Bool
    forall a. Ix a => (a, a) -> a -> Bool
    inRange (a
    l2,a
    u2) a
    i2
      {-# INLINE inRange #-}

    data instance U.Vector    (V2 a) =  V_V2 {-# UNPACK #-} !Int !(U.Vector    a)
    data instance U.MVector s (V2 a) = MV_V2 {-# UNPACK #-} !Int !(U.MVector s a)
    instance U.Unbox a => U.Unbox (V2 a)

    instance U.Unbox a => M.MVector U.MVector (V2 a) where
      {-# INLINE basicLength #-}
      {-# INLINE basicUnsafeSlice #-}
      {-# INLINE basicOverlaps #-}
      {-# INLINE basicUnsafeNew #-}
      {-# INLINE basicUnsafeRead #-}
      {-# INLINE basicUnsafeWrite #-}
      basicLength :: forall s. MVector s (V2 a) -> Int
    basicLength (MV_V2 Int
    n MVector s a
    _) = Int
    n
      basicUnsafeSlice :: forall s. Int -> Int -> MVector s (V2 a) -> MVector s (V2 a)
    basicUnsafeSlice Int
    m Int
    n (MV_V2 Int
    _ MVector s a
    v) = Int -> MVector s a -> MVector s (V2 a)
    forall s a. Int -> MVector s a -> MVector s (V2 a)
    MV_V2 Int
    n (Int -> Int -> MVector s a -> MVector s a
    forall s. Int -> Int -> MVector s a -> MVector s a
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    Int -> Int -> v s a -> v s a
    M.basicUnsafeSlice (Int
    2Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    m) (Int
    2Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    n) MVector s a
    v)
      basicOverlaps :: forall s. MVector s (V2 a) -> MVector s (V2 a) -> Bool
    basicOverlaps (MV_V2 Int
    _ MVector s a
    v) (MV_V2 Int
    _ MVector s a
    u) = MVector s a -> MVector s a -> Bool
    forall s. MVector s a -> MVector s a -> Bool
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> v s a -> Bool
    M.basicOverlaps MVector s a
    v MVector s a
    u
      basicUnsafeNew :: forall s. Int -> ST s (MVector s (V2 a))
    basicUnsafeNew Int
    n = (MVector s a -> MVector s (V2 a))
    -> ST s (MVector s a) -> ST s (MVector s (V2 a))
    forall (m :: Type -> Type) a1 r.
    Monad m =>
    (a1 -> r) -> m a1 -> m r
    liftM (Int -> MVector s a -> MVector s (V2 a)
    forall s a. Int -> MVector s a -> MVector s (V2 a)
    MV_V2 Int
    n) (Int -> ST s (MVector s a)
    forall s. Int -> ST s (MVector s a)
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    Int -> ST s (v s a)
    M.basicUnsafeNew (Int
    2Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    n))
      basicUnsafeRead :: forall s. MVector s (V2 a) -> Int -> ST s (V2 a)
    basicUnsafeRead (MV_V2 Int
    _ MVector s a
    v) Int
    i =
        do let o :: Int
    o = Int
    2Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    i
           a
    x <- MVector s a -> Int -> ST s a
    forall s. MVector s a -> Int -> ST s a
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> ST s a
    M.basicUnsafeRead MVector s a
    v Int
    o
           a
    y <- MVector s a -> Int -> ST s a
    forall s. MVector s a -> Int -> ST s a
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> ST s a
    M.basicUnsafeRead MVector s a
    v (Int
    oInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    1)
           V2 a -> ST s (V2 a)
    forall a. a -> ST s a
    forall (m :: Type -> Type) a. Monad m => a -> m a
    return (a -> a -> V2 a
    forall a. a -> a -> V2 a
    V2 a
    x a
    y)
      basicUnsafeWrite :: forall s. MVector s (V2 a) -> Int -> V2 a -> ST s ()
    basicUnsafeWrite (MV_V2 Int
    _ MVector s a
    v) Int
    i (V2 a
    x a
    y) =
        do let o :: Int
    o = Int
    2Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    i
           MVector s a -> Int -> a -> ST s ()
    forall s. MVector s a -> Int -> a -> ST s ()
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> a -> ST s ()
    M.basicUnsafeWrite MVector s a
    v Int
    o     a
    x
           MVector s a -> Int -> a -> ST s ()
    forall s. MVector s a -> Int -> a -> ST s ()
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> a -> ST s ()
    M.basicUnsafeWrite MVector s a
    v (Int
    oInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    1) a
    y
    #if MIN_VERSION_vector(0,11,0)
      basicInitialize :: forall s. MVector s (V2 a) -> ST s ()
    basicInitialize (MV_V2 Int
    _ MVector s a
    v) = MVector s a -> ST s ()
    forall s. MVector s a -> ST s ()
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> ST s ()
    M.basicInitialize MVector s a
    v
      {-# INLINE basicInitialize #-}
    #endif

    instance U.Unbox a => G.Vector U.Vector (V2 a) where
      {-# INLINE basicUnsafeFreeze #-}
      {-# INLINE basicUnsafeThaw   #-}
      {-# INLINE basicLength       #-}
      {-# INLINE basicUnsafeSlice  #-}
      {-# INLINE basicUnsafeIndexM #-}
      basicUnsafeFreeze :: forall s. Mutable Vector s (V2 a) -> ST s (Vector (V2 a))
    basicUnsafeFreeze (MV_V2 Int
    n MVector s a
    v) = (Vector a -> Vector (V2 a))
    -> ST s (Vector a) -> ST s (Vector (V2 a))
    forall (m :: Type -> Type) a1 r.
    Monad m =>
    (a1 -> r) -> m a1 -> m r
    liftM ( Int -> Vector a -> Vector (V2 a)
    forall a. Int -> Vector a -> Vector (V2 a)
    V_V2 Int
    n) (Mutable Vector s a -> ST s (Vector a)
    forall s. Mutable Vector s a -> ST s (Vector a)
    forall (v :: Type -> Type) a s.
    Vector v a =>
    Mutable v s a -> ST s (v a)
    G.basicUnsafeFreeze MVector s a
    Mutable Vector s a
    v)
      basicUnsafeThaw :: forall s. Vector (V2 a) -> ST s (Mutable Vector s (V2 a))
    basicUnsafeThaw   ( V_V2 Int
    n Vector a
    v) = (MVector s a -> MVector s (V2 a))
    -> ST s (MVector s a) -> ST s (MVector s (V2 a))
    forall (m :: Type -> Type) a1 r.
    Monad m =>
    (a1 -> r) -> m a1 -> m r
    liftM (Int -> MVector s a -> MVector s (V2 a)
    forall s a. Int -> MVector s a -> MVector s (V2 a)
    MV_V2 Int
    n) (Vector a -> ST s (Mutable Vector s a)
    forall s. Vector a -> ST s (Mutable Vector s a)
    forall (v :: Type -> Type) a s.
    Vector v a =>
    v a -> ST s (Mutable v s a)
    G.basicUnsafeThaw   Vector a
    v)
      basicLength :: Vector (V2 a) -> Int
    basicLength       ( V_V2 Int
    n Vector a
    _) = Int
    n
      basicUnsafeSlice :: Int -> Int -> Vector (V2 a) -> Vector (V2 a)
    basicUnsafeSlice Int
    m Int
    n (V_V2 Int
    _ Vector a
    v) = Int -> Vector a -> Vector (V2 a)
    forall a. Int -> Vector a -> Vector (V2 a)
    V_V2 Int
    n (Int -> Int -> Vector a -> Vector a
    forall (v :: Type -> Type) a.
    Vector v a =>
    Int -> Int -> v a -> v a
    G.basicUnsafeSlice (Int
    2Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    m) (Int
    2Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    n) Vector a
    v)
      basicUnsafeIndexM :: Vector (V2 a) -> Int -> Box (V2 a)
    basicUnsafeIndexM (V_V2 Int
    _ Vector a
    v) Int
    i =
        do let o :: Int
    o = Int
    2Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    i
           a
    x <- Vector a -> Int -> Box a
    forall (v :: Type -> Type) a. Vector v a => v a -> Int -> Box a
    G.basicUnsafeIndexM Vector a
    v Int
    o
           a
    y <- Vector a -> Int -> Box a
    forall (v :: Type -> Type) a. Vector v a => v a -> Int -> Box a
    G.basicUnsafeIndexM Vector a
    v (Int
    oInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    1)
           V2 a -> Box (V2 a)
    forall a. a -> Box a
    forall (m :: Type -> Type) a. Monad m => a -> m a
    return (a -> a -> V2 a
    forall a. a -> a -> V2 a
    V2 a
    x a
    y)

    instance MonadZip V2 where
      mzipWith :: forall a b c. (a -> b -> c) -> V2 a -> V2 b -> V2 c
    mzipWith = (a -> b -> c) -> V2 a -> V2 b -> V2 c
    forall a b c. (a -> b -> c) -> V2 a -> V2 b -> V2 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2

    instance MonadFix V2 where
      mfix :: forall a. (a -> V2 a) -> V2 a
    mfix a -> V2 a
    f = a -> a -> V2 a
    forall a. a -> a -> V2 a
    V2 (let V2 a
    a a
    _ = a -> V2 a
    f a
    a in a
    a)
                  (let V2 a
    _ a
    a = a -> V2 a
    f a
    a in a
    a)

    instance Bounded a => Bounded (V2 a) where
      minBound :: V2 a
    minBound = a -> V2 a
    forall a. a -> V2 a
    forall (f :: Type -> Type) a. Applicative f => a -> f a
    pure a
    forall a. Bounded a => a
    minBound
      {-# INLINE minBound #-}
      maxBound :: V2 a
    maxBound = a -> V2 a
    forall a. a -> V2 a
    forall (f :: Type -> Type) a. Applicative f => a -> f a
    pure a
    forall a. Bounded a => a
    maxBound
      {-# INLINE maxBound #-}

    -- | A 3-dimensional vector
    data V3 a = V3 !a !a !a
      deriving (V3 a -> V3 a -> Bool
    (V3 a -> V3 a -> Bool) -> (V3 a -> V3 a -> Bool) -> Eq (V3 a)
    forall a. Eq a => V3 a -> V3 a -> Bool
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: forall a. Eq a => V3 a -> V3 a -> Bool
    == :: V3 a -> V3 a -> Bool
    $c/= :: forall a. Eq a => V3 a -> V3 a -> Bool
    /= :: V3 a -> V3 a -> Bool
    Eq, Eq (V3 a)
    Eq (V3 a) =>
    (V3 a -> V3 a -> Ordering)
    -> (V3 a -> V3 a -> Bool)
    -> (V3 a -> V3 a -> Bool)
    -> (V3 a -> V3 a -> Bool)
    -> (V3 a -> V3 a -> Bool)
    -> (V3 a -> V3 a -> V3 a)
    -> (V3 a -> V3 a -> V3 a)
    -> Ord (V3 a)
    V3 a -> V3 a -> Bool
    V3 a -> V3 a -> Ordering
    V3 a -> V3 a -> V3 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 (V3 a)
    forall a. Ord a => V3 a -> V3 a -> Bool
    forall a. Ord a => V3 a -> V3 a -> Ordering
    forall a. Ord a => V3 a -> V3 a -> V3 a
    $ccompare :: forall a. Ord a => V3 a -> V3 a -> Ordering
    compare :: V3 a -> V3 a -> Ordering
    $c< :: forall a. Ord a => V3 a -> V3 a -> Bool
    < :: V3 a -> V3 a -> Bool
    $c<= :: forall a. Ord a => V3 a -> V3 a -> Bool
    <= :: V3 a -> V3 a -> Bool
    $c> :: forall a. Ord a => V3 a -> V3 a -> Bool
    > :: V3 a -> V3 a -> Bool
    $c>= :: forall a. Ord a => V3 a -> V3 a -> Bool
    >= :: V3 a -> V3 a -> Bool
    $cmax :: forall a. Ord a => V3 a -> V3 a -> V3 a
    max :: V3 a -> V3 a -> V3 a
    $cmin :: forall a. Ord a => V3 a -> V3 a -> V3 a
    min :: V3 a -> V3 a -> V3 a
    Ord, Int -> V3 a -> ShowS
    [V3 a] -> ShowS
    V3 a -> String
    (Int -> V3 a -> ShowS)
    -> (V3 a -> String) -> ([V3 a] -> ShowS) -> Show (V3 a)
    forall a. Show a => Int -> V3 a -> ShowS
    forall a. Show a => [V3 a] -> ShowS
    forall a. Show a => V3 a -> String
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: forall a. Show a => Int -> V3 a -> ShowS
    showsPrec :: Int -> V3 a -> ShowS
    $cshow :: forall a. Show a => V3 a -> String
    show :: V3 a -> String
    $cshowList :: forall a. Show a => [V3 a] -> ShowS
    showList :: [V3 a] -> ShowS
    Show, ReadPrec [V3 a]
    ReadPrec (V3 a)
    Int -> ReadS (V3 a)
    ReadS [V3 a]
    (Int -> ReadS (V3 a))
    -> ReadS [V3 a]
    -> ReadPrec (V3 a)
    -> ReadPrec [V3 a]
    -> Read (V3 a)
    forall a. Read a => ReadPrec [V3 a]
    forall a. Read a => ReadPrec (V3 a)
    forall a. Read a => Int -> ReadS (V3 a)
    forall a. Read a => ReadS [V3 a]
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: forall a. Read a => Int -> ReadS (V3 a)
    readsPrec :: Int -> ReadS (V3 a)
    $creadList :: forall a. Read a => ReadS [V3 a]
    readList :: ReadS [V3 a]
    $creadPrec :: forall a. Read a => ReadPrec (V3 a)
    readPrec :: ReadPrec (V3 a)
    $creadListPrec :: forall a. Read a => ReadPrec [V3 a]
    readListPrec :: ReadPrec [V3 a]
    Read, Typeable (V3 a)
    Typeable (V3 a) =>
    (forall (c :: Type -> Type).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> V3 a -> c (V3 a))
    -> (forall (c :: Type -> Type).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c (V3 a))
    -> (V3 a -> Constr)
    -> (V3 a -> DataType)
    -> (forall (t :: Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c (V3 a)))
    -> (forall (t :: Type -> Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V3 a)))
    -> ((forall b. Data b => b -> b) -> V3 a -> V3 a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> V3 a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> V3 a -> u)
    -> (forall (m :: Type -> Type).
        Monad m =>
        (forall d. Data d => d -> m d) -> V3 a -> m (V3 a))
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> V3 a -> m (V3 a))
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> V3 a -> m (V3 a))
    -> Data (V3 a)
    V3 a -> Constr
    V3 a -> DataType
    (forall b. Data b => b -> b) -> V3 a -> V3 a
    forall a. Data a => Typeable (V3 a)
    forall a. Data a => V3 a -> Constr
    forall a. Data a => V3 a -> DataType
    forall a. Data a => (forall b. Data b => b -> b) -> V3 a -> V3 a
    forall a u.
    Data a =>
    Int -> (forall d. Data d => d -> u) -> V3 a -> u
    forall a u. Data a => (forall d. Data d => d -> u) -> V3 a -> [u]
    forall a r r'.
    Data a =>
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r
    forall a r r'.
    Data a =>
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r
    forall a (m :: Type -> Type).
    (Data a, Monad m) =>
    (forall d. Data d => d -> m d) -> V3 a -> m (V3 a)
    forall a (m :: Type -> Type).
    (Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> V3 a -> m (V3 a)
    forall a (c :: Type -> Type).
    Data a =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (V3 a)
    forall a (c :: Type -> Type).
    Data a =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> V3 a -> c (V3 a)
    forall a (t :: Type -> Type) (c :: Type -> Type).
    (Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (V3 a))
    forall a (t :: Type -> Type -> Type) (c :: Type -> Type).
    (Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V3 a))
    forall a.
    Typeable a =>
    (forall (c :: Type -> Type).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: Type -> Type).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: Type -> Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: Type -> Type).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> V3 a -> u
    forall u. (forall d. Data d => d -> u) -> V3 a -> [u]
    forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r
    forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r
    forall (m :: Type -> Type).
    Monad m =>
    (forall d. Data d => d -> m d) -> V3 a -> m (V3 a)
    forall (m :: Type -> Type).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> V3 a -> m (V3 a)
    forall (c :: Type -> Type).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (V3 a)
    forall (c :: Type -> Type).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> V3 a -> c (V3 a)
    forall (t :: Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (V3 a))
    forall (t :: Type -> Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V3 a))
    $cgfoldl :: forall a (c :: Type -> Type).
    Data a =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> V3 a -> c (V3 a)
    gfoldl :: forall (c :: Type -> Type).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> V3 a -> c (V3 a)
    $cgunfold :: forall a (c :: Type -> Type).
    Data a =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (V3 a)
    gunfold :: forall (c :: Type -> Type).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (V3 a)
    $ctoConstr :: forall a. Data a => V3 a -> Constr
    toConstr :: V3 a -> Constr
    $cdataTypeOf :: forall a. Data a => V3 a -> DataType
    dataTypeOf :: V3 a -> DataType
    $cdataCast1 :: forall a (t :: Type -> Type) (c :: Type -> Type).
    (Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (V3 a))
    dataCast1 :: forall (t :: Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (V3 a))
    $cdataCast2 :: forall a (t :: Type -> Type -> Type) (c :: Type -> Type).
    (Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V3 a))
    dataCast2 :: forall (t :: Type -> Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V3 a))
    $cgmapT :: forall a. Data a => (forall b. Data b => b -> b) -> V3 a -> V3 a
    gmapT :: (forall b. Data b => b -> b) -> V3 a -> V3 a
    $cgmapQl :: forall a r r'.
    Data a =>
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r
    gmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r
    $cgmapQr :: forall a r r'.
    Data a =>
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r
    gmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r
    $cgmapQ :: forall a u. Data a => (forall d. Data d => d -> u) -> V3 a -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> V3 a -> [u]
    $cgmapQi :: forall a u.
    Data a =>
    Int -> (forall d. Data d => d -> u) -> V3 a -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> V3 a -> u
    $cgmapM :: forall a (m :: Type -> Type).
    (Data a, Monad m) =>
    (forall d. Data d => d -> m d) -> V3 a -> m (V3 a)
    gmapM :: forall (m :: Type -> Type).
    Monad m =>
    (forall d. Data d => d -> m d) -> V3 a -> m (V3 a)
    $cgmapMp :: forall a (m :: Type -> Type).
    (Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> V3 a -> m (V3 a)
    gmapMp :: forall (m :: Type -> Type).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> V3 a -> m (V3 a)
    $cgmapMo :: forall a (m :: Type -> Type).
    (Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> V3 a -> m (V3 a)
    gmapMo :: forall (m :: Type -> Type).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> V3 a -> m (V3 a)
    Data, Typeable, (forall x. V3 a -> Rep (V3 a) x)
    -> (forall x. Rep (V3 a) x -> V3 a) -> Generic (V3 a)
    forall x. Rep (V3 a) x -> V3 a
    forall x. V3 a -> Rep (V3 a) x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    forall a x. Rep (V3 a) x -> V3 a
    forall a x. V3 a -> Rep (V3 a) x
    $cfrom :: forall a x. V3 a -> Rep (V3 a) x
    from :: forall x. V3 a -> Rep (V3 a) x
    $cto :: forall a x. Rep (V3 a) x -> V3 a
    to :: forall x. Rep (V3 a) x -> V3 a
    Generic, (forall a. V3 a -> Rep1 V3 a)
    -> (forall a. Rep1 V3 a -> V3 a) -> Generic1 V3
    forall a. Rep1 V3 a -> V3 a
    forall a. V3 a -> Rep1 V3 a
    forall k (f :: k -> Type).
    (forall (a :: k). f a -> Rep1 f a)
    -> (forall (a :: k). Rep1 f a -> f a) -> Generic1 f
    $cfrom1 :: forall a. V3 a -> Rep1 V3 a
    from1 :: forall a. V3 a -> Rep1 V3 a
    $cto1 :: forall a. Rep1 V3 a -> V3 a
    to1 :: forall a. Rep1 V3 a -> V3 a
    Generic1)

    instance Functor V3 where
      fmap :: forall a b. (a -> b) -> V3 a -> V3 b
    fmap a -> b
    f (V3 a
    a a
    b a
    c) = b -> b -> b -> V3 b
    forall a. a -> a -> a -> V3 a
    V3 (a -> b
    f a
    a) (a -> b
    f a
    b) (a -> b
    f a
    c)
      {-# INLINE fmap #-}
      a
    a <$ :: forall a b. a -> V3 b -> V3 a
    <$ V3 b
    _ = a -> a -> a -> V3 a
    forall a. a -> a -> a -> V3 a
    V3 a
    a a
    a a
    a
      {-# INLINE (<$) #-}

    instance Foldable V3 where
      foldMap :: forall m a. Monoid m => (a -> m) -> V3 a -> m
    foldMap a -> m
    f (V3 a
    a a
    b a
    c) = a -> m
    f a
    a m -> m -> m
    forall a. Monoid a => a -> a -> a
    `mappend` a -> m
    f a
    b m -> m -> m
    forall a. Monoid a => a -> a -> a
    `mappend` a -> m
    f a
    c
      {-# INLINE foldMap #-}

    instance Traversable V3 where
      traverse :: forall (f :: Type -> Type) a b.
    Applicative f =>
    (a -> f b) -> V3 a -> f (V3 b)
    traverse a -> f b
    f (V3 a
    a a
    b a
    c) = b -> b -> b -> V3 b
    forall a. a -> a -> a -> V3 a
    V3 (b -> b -> b -> V3 b) -> f b -> f (b -> b -> V3 b)
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    <$> a -> f b
    f a
    a f (b -> b -> V3 b) -> f b -> f (b -> V3 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: Type -> Type) a b.
    Applicative f =>
    f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    b f (b -> V3 b) -> f b -> f (V3 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: Type -> Type) a b.
    Applicative f =>
    f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    c
      {-# INLINE traverse #-}

    instance Applicative V3 where
      pure :: forall a. a -> V3 a
    pure a
    a = a -> a -> a -> V3 a
    forall a. a -> a -> a -> V3 a
    V3 a
    a a
    a a
    a
      {-# INLINE pure #-}
      V3 a -> b
    a a -> b
    b a -> b
    c <*> :: forall a b. V3 (a -> b) -> V3 a -> V3 b
    <*> V3 a
    d a
    e a
    f = b -> b -> b -> V3 b
    forall a. a -> a -> a -> V3 a
    V3 (a -> b
    a a
    d) (a -> b
    b a
    e) (a -> b
    c a
    f)
      {-# INLINE (<*>) #-}

    instance Monad V3 where
      return :: forall a. a -> V3 a
    return = a -> V3 a
    forall a. a -> V3 a
    forall (f :: Type -> Type) a. Applicative f => a -> f a
    pure
      {-# INLINE return #-}
      V3 a
    a a
    b a
    c >>= :: forall a b. V3 a -> (a -> V3 b) -> V3 b
    >>= a -> V3 b
    f = b -> b -> b -> V3 b
    forall a. a -> a -> a -> V3 a
    V3 b
    a' b
    b' b
    c' where
        V3 b
    a' b
    _ b
    _ = a -> V3 b
    f a
    a
        V3 b
    _ b
    b' b
    _ = a -> V3 b
    f a
    b
        V3 b
    _ b
    _ b
    c' = a -> V3 b
    f a
    c
      {-# INLINE (>>=) #-}

    instance Num a => Num (V3 a) where
      + :: V3 a -> V3 a -> V3 a
    (+) = (a -> a -> a) -> V3 a -> V3 a -> V3 a
    forall a b c. (a -> b -> c) -> V3 a -> V3 b -> V3 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2 a -> a -> a
    forall a. Num a => a -> a -> a
    (+)
      {-# INLINE (+) #-}
      (-) = (a -> a -> a) -> V3 a -> V3 a -> V3 a
    forall a b c. (a -> b -> c) -> V3 a -> V3 b -> V3 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2 (-)
      {-# INLINE (-) #-}
      * :: V3 a -> V3 a -> V3 a
    (*) = (a -> a -> a) -> V3 a -> V3 a -> V3 a
    forall a b c. (a -> b -> c) -> V3 a -> V3 b -> V3 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2 a -> a -> a
    forall a. Num a => a -> a -> a
    (*)
      {-# INLINE (*) #-}
      negate :: V3 a -> V3 a
    negate = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Num a => a -> a
    negate
      {-# INLINE negate #-}
      abs :: V3 a -> V3 a
    abs = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Num a => a -> a
    abs
      {-# INLINE abs #-}
      signum :: V3 a -> V3 a
    signum = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Num a => a -> a
    signum
      {-# INLINE signum #-}
      fromInteger :: Integer -> V3 a
    fromInteger = a -> V3 a
    forall a. a -> V3 a
    forall (f :: Type -> Type) a. Applicative f => a -> f a
    pure (a -> V3 a) -> (Integer -> a) -> Integer -> V3 a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Integer -> a
    forall a. Num a => Integer -> a
    fromInteger
      {-# INLINE fromInteger #-}

    instance Fractional a => Fractional (V3 a) where
      recip :: V3 a -> V3 a
    recip = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Fractional a => a -> a
    recip
      {-# INLINE recip #-}
      / :: V3 a -> V3 a -> V3 a
    (/) = (a -> a -> a) -> V3 a -> V3 a -> V3 a
    forall a b c. (a -> b -> c) -> V3 a -> V3 b -> V3 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2 a -> a -> a
    forall a. Fractional a => a -> a -> a
    (/)
      {-# INLINE (/) #-}
      fromRational :: Rational -> V3 a
    fromRational = a -> V3 a
    forall a. a -> V3 a
    forall (f :: Type -> Type) a. Applicative f => a -> f a
    pure (a -> V3 a) -> (Rational -> a) -> Rational -> V3 a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Rational -> a
    forall a. Fractional a => Rational -> a
    fromRational
      {-# INLINE fromRational #-}

    instance Floating a => Floating (V3 a) where
        pi :: V3 a
    pi = a -> V3 a
    forall a. a -> V3 a
    forall (f :: Type -> Type) a. Applicative f => a -> f a
    pure a
    forall a. Floating a => a
    pi
        {-# INLINE pi #-}
        exp :: V3 a -> V3 a
    exp = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    exp
        {-# INLINE exp #-}
        sqrt :: V3 a -> V3 a
    sqrt = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    sqrt
        {-# INLINE sqrt #-}
        log :: V3 a -> V3 a
    log = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    log
        {-# INLINE log #-}
        ** :: V3 a -> V3 a -> V3 a
    (**) = (a -> a -> a) -> V3 a -> V3 a -> V3 a
    forall a b c. (a -> b -> c) -> V3 a -> V3 b -> V3 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2 a -> a -> a
    forall a. Floating a => a -> a -> a
    (**)
        {-# INLINE (**) #-}
        logBase :: V3 a -> V3 a -> V3 a
    logBase = (a -> a -> a) -> V3 a -> V3 a -> V3 a
    forall a b c. (a -> b -> c) -> V3 a -> V3 b -> V3 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2 a -> a -> a
    forall a. Floating a => a -> a -> a
    logBase
        {-# INLINE logBase #-}
        sin :: V3 a -> V3 a
    sin = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    sin
        {-# INLINE sin #-}
        tan :: V3 a -> V3 a
    tan = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    tan
        {-# INLINE tan #-}
        cos :: V3 a -> V3 a
    cos = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    cos
        {-# INLINE cos #-}
        asin :: V3 a -> V3 a
    asin = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    asin
        {-# INLINE asin #-}
        atan :: V3 a -> V3 a
    atan = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    atan
        {-# INLINE atan #-}
        acos :: V3 a -> V3 a
    acos = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    acos
        {-# INLINE acos #-}
        sinh :: V3 a -> V3 a
    sinh = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    sinh
        {-# INLINE sinh #-}
        tanh :: V3 a -> V3 a
    tanh = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    tanh
        {-# INLINE tanh #-}
        cosh :: V3 a -> V3 a
    cosh = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    cosh
        {-# INLINE cosh #-}
        asinh :: V3 a -> V3 a
    asinh = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    asinh
        {-# INLINE asinh #-}
        atanh :: V3 a -> V3 a
    atanh = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    atanh
        {-# INLINE atanh #-}
        acosh :: V3 a -> V3 a
    acosh = (a -> a) -> V3 a -> V3 a
    forall a b. (a -> b) -> V3 a -> V3 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    acosh
        {-# INLINE acosh #-}

    instance Storable a => Storable (V3 a) where
      sizeOf :: V3 a -> Int
    sizeOf V3 a
    _ = Int
    3 Int -> Int -> Int
    forall a. Num a => a -> a -> a
    * a -> Int
    forall a. Storable a => a -> Int
    sizeOf (a
    forall a. HasCallStack => a
    undefined::a)
      {-# INLINE sizeOf #-}
      alignment :: V3 a -> Int
    alignment V3 a
    _ = a -> Int
    forall a. Storable a => a -> Int
    alignment (a
    forall a. HasCallStack => a
    undefined::a)
      {-# INLINE alignment #-}
      poke :: Ptr (V3 a) -> V3 a -> IO ()
    poke Ptr (V3 a)
    ptr (V3 a
    x a
    y a
    z) = do Ptr a -> a -> IO ()
    forall a. Storable a => Ptr a -> a -> IO ()
    poke Ptr a
    ptr' a
    x
                               Ptr a -> Int -> a -> IO ()
    forall a. Storable a => Ptr a -> Int -> a -> IO ()
    pokeElemOff Ptr a
    ptr' Int
    1 a
    y
                               Ptr a -> Int -> a -> IO ()
    forall a. Storable a => Ptr a -> Int -> a -> IO ()
    pokeElemOff Ptr a
    ptr' Int
    2 a
    z
        where ptr' :: Ptr a
    ptr' = Ptr (V3 a) -> Ptr a
    forall a b. Ptr a -> Ptr b
    castPtr Ptr (V3 a)
    ptr
      {-# INLINE poke #-}
      peek :: Ptr (V3 a) -> IO (V3 a)
    peek Ptr (V3 a)
    ptr = a -> a -> a -> V3 a
    forall a. a -> a -> a -> V3 a
    V3 (a -> a -> a -> V3 a) -> IO a -> IO (a -> a -> V3 a)
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    <$> Ptr a -> IO a
    forall a. Storable a => Ptr a -> IO a
    peek Ptr a
    ptr' IO (a -> a -> V3 a) -> IO a -> IO (a -> V3 a)
    forall a b. IO (a -> b) -> IO a -> IO b
    forall (f :: Type -> Type) a b.
    Applicative f =>
    f (a -> b) -> f a -> f b
    <*> Ptr a -> Int -> IO a
    forall a. Storable a => Ptr a -> Int -> IO a
    peekElemOff Ptr a
    ptr' Int
    1 IO (a -> V3 a) -> IO a -> IO (V3 a)
    forall a b. IO (a -> b) -> IO a -> IO b
    forall (f :: Type -> Type) a b.
    Applicative f =>
    f (a -> b) -> f a -> f b
    <*> Ptr a -> Int -> IO a
    forall a. Storable a => Ptr a -> Int -> IO a
    peekElemOff Ptr a
    ptr' Int
    2
        where ptr' :: Ptr a
    ptr' = Ptr (V3 a) -> Ptr a
    forall a b. Ptr a -> Ptr b
    castPtr Ptr (V3 a)
    ptr
      {-# INLINE peek #-}

    instance Ix a => Ix (V3 a) where
      {-# SPECIALISE instance Ix (V3 Int) #-}

      range :: (V3 a, V3 a) -> [V3 a]
    range (V3 a
    l1 a
    l2 a
    l3,V3 a
    u1 a
    u2 a
    u3) =
          [a -> a -> a -> V3 a
    forall a. a -> a -> a -> V3 a
    V3 a
    i1 a
    i2 a
    i3 | a
    i1 <- (a, a) -> [a]
    forall a. Ix a => (a, a) -> [a]
    range (a
    l1,a
    u1)
                       , a
    i2 <- (a, a) -> [a]
    forall a. Ix a => (a, a) -> [a]
    range (a
    l2,a
    u2)
                       , a
    i3 <- (a, a) -> [a]
    forall a. Ix a => (a, a) -> [a]
    range (a
    l3,a
    u3)
                       ]
      {-# INLINE range #-}

      unsafeIndex :: (V3 a, V3 a) -> V3 a -> Int
    unsafeIndex (V3 a
    l1 a
    l2 a
    l3,V3 a
    u1 a
    u2 a
    u3) (V3 a
    i1 a
    i2 a
    i3) =
        (a, a) -> a -> Int
    forall a. Ix a => (a, a) -> a -> Int
    unsafeIndex (a
    l3,a
    u3) a
    i3 Int -> Int -> Int
    forall a. Num a => a -> a -> a
    + (a, a) -> Int
    forall a. Ix a => (a, a) -> Int
    unsafeRangeSize (a
    l3,a
    u3) Int -> Int -> Int
    forall a. Num a => a -> a -> a
    * (
        (a, a) -> a -> Int
    forall a. Ix a => (a, a) -> a -> Int
    unsafeIndex (a
    l2,a
    u2) a
    i2 Int -> Int -> Int
    forall a. Num a => a -> a -> a
    + (a, a) -> Int
    forall a. Ix a => (a, a) -> Int
    unsafeRangeSize (a
    l2,a
    u2) Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *
        (a, a) -> a -> Int
    forall a. Ix a => (a, a) -> a -> Int
    unsafeIndex (a
    l1,a
    u1) a
    i1)
      {-# INLINE unsafeIndex #-}

      inRange :: (V3 a, V3 a) -> V3 a -> Bool
    inRange (V3 a
    l1 a
    l2 a
    l3,V3 a
    u1 a
    u2 a
    u3) (V3 a
    i1 a
    i2 a
    i3) =
        (a, a) -> a -> Bool
    forall a. Ix a => (a, a) -> a -> Bool
    inRange (a
    l1,a
    u1) a
    i1 Bool -> Bool -> Bool
    && (a, a) -> a -> Bool
    forall a. Ix a => (a, a) -> a -> Bool
    inRange (a
    l2,a
    u2) a
    i2 Bool -> Bool -> Bool
    &&
        (a, a) -> a -> Bool
    forall a. Ix a => (a, a) -> a -> Bool
    inRange (a
    l3,a
    u3) a
    i3
      {-# INLINE inRange #-}

    data instance U.Vector    (V3 a) =  V_V3 {-# UNPACK #-} !Int !(U.Vector    a)
    data instance U.MVector s (V3 a) = MV_V3 {-# UNPACK #-} !Int !(U.MVector s a)
    instance U.Unbox a => U.Unbox (V3 a)

    instance U.Unbox a => M.MVector U.MVector (V3 a) where
      {-# INLINE basicLength #-}
      {-# INLINE basicUnsafeSlice #-}
      {-# INLINE basicOverlaps #-}
      {-# INLINE basicUnsafeNew #-}
      {-# INLINE basicUnsafeRead #-}
      {-# INLINE basicUnsafeWrite #-}
      basicLength :: forall s. MVector s (V3 a) -> Int
    basicLength (MV_V3 Int
    n MVector s a
    _) = Int
    n
      basicUnsafeSlice :: forall s. Int -> Int -> MVector s (V3 a) -> MVector s (V3 a)
    basicUnsafeSlice Int
    m Int
    n (MV_V3 Int
    _ MVector s a
    v) = Int -> MVector s a -> MVector s (V3 a)
    forall s a. Int -> MVector s a -> MVector s (V3 a)
    MV_V3 Int
    n (Int -> Int -> MVector s a -> MVector s a
    forall s. Int -> Int -> MVector s a -> MVector s a
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    Int -> Int -> v s a -> v s a
    M.basicUnsafeSlice (Int
    3Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    m) (Int
    3Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    n) MVector s a
    v)
      basicOverlaps :: forall s. MVector s (V3 a) -> MVector s (V3 a) -> Bool
    basicOverlaps (MV_V3 Int
    _ MVector s a
    v) (MV_V3 Int
    _ MVector s a
    u) = MVector s a -> MVector s a -> Bool
    forall s. MVector s a -> MVector s a -> Bool
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> v s a -> Bool
    M.basicOverlaps MVector s a
    v MVector s a
    u
      basicUnsafeNew :: forall s. Int -> ST s (MVector s (V3 a))
    basicUnsafeNew Int
    n = (MVector s a -> MVector s (V3 a))
    -> ST s (MVector s a) -> ST s (MVector s (V3 a))
    forall (m :: Type -> Type) a1 r.
    Monad m =>
    (a1 -> r) -> m a1 -> m r
    liftM (Int -> MVector s a -> MVector s (V3 a)
    forall s a. Int -> MVector s a -> MVector s (V3 a)
    MV_V3 Int
    n) (Int -> ST s (MVector s a)
    forall s. Int -> ST s (MVector s a)
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    Int -> ST s (v s a)
    M.basicUnsafeNew (Int
    3Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    n))
      basicUnsafeRead :: forall s. MVector s (V3 a) -> Int -> ST s (V3 a)
    basicUnsafeRead (MV_V3 Int
    _ MVector s a
    v) Int
    i =
        do let o :: Int
    o = Int
    3Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    i
           a
    x <- MVector s a -> Int -> ST s a
    forall s. MVector s a -> Int -> ST s a
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> ST s a
    M.basicUnsafeRead MVector s a
    v Int
    o
           a
    y <- MVector s a -> Int -> ST s a
    forall s. MVector s a -> Int -> ST s a
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> ST s a
    M.basicUnsafeRead MVector s a
    v (Int
    oInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    1)
           a
    z <- MVector s a -> Int -> ST s a
    forall s. MVector s a -> Int -> ST s a
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> ST s a
    M.basicUnsafeRead MVector s a
    v (Int
    oInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    2)
           V3 a -> ST s (V3 a)
    forall a. a -> ST s a
    forall (m :: Type -> Type) a. Monad m => a -> m a
    return (a -> a -> a -> V3 a
    forall a. a -> a -> a -> V3 a
    V3 a
    x a
    y a
    z)
      basicUnsafeWrite :: forall s. MVector s (V3 a) -> Int -> V3 a -> ST s ()
    basicUnsafeWrite (MV_V3 Int
    _ MVector s a
    v) Int
    i (V3 a
    x a
    y a
    z) =
        do let o :: Int
    o = Int
    3Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    i
           MVector s a -> Int -> a -> ST s ()
    forall s. MVector s a -> Int -> a -> ST s ()
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> a -> ST s ()
    M.basicUnsafeWrite MVector s a
    v Int
    o     a
    x
           MVector s a -> Int -> a -> ST s ()
    forall s. MVector s a -> Int -> a -> ST s ()
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> a -> ST s ()
    M.basicUnsafeWrite MVector s a
    v (Int
    oInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    1) a
    y
           MVector s a -> Int -> a -> ST s ()
    forall s. MVector s a -> Int -> a -> ST s ()
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> a -> ST s ()
    M.basicUnsafeWrite MVector s a
    v (Int
    oInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    2) a
    z
    #if MIN_VERSION_vector(0,11,0)
      basicInitialize :: forall s. MVector s (V3 a) -> ST s ()
    basicInitialize (MV_V3 Int
    _ MVector s a
    v) = MVector s a -> ST s ()
    forall s. MVector s a -> ST s ()
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> ST s ()
    M.basicInitialize MVector s a
    v
      {-# INLINE basicInitialize #-}
    #endif

    instance U.Unbox a => G.Vector U.Vector (V3 a) where
      {-# INLINE basicUnsafeFreeze #-}
      {-# INLINE basicUnsafeThaw   #-}
      {-# INLINE basicLength       #-}
      {-# INLINE basicUnsafeSlice  #-}
      {-# INLINE basicUnsafeIndexM #-}
      basicUnsafeFreeze :: forall s. Mutable Vector s (V3 a) -> ST s (Vector (V3 a))
    basicUnsafeFreeze (MV_V3 Int
    n MVector s a
    v) = (Vector a -> Vector (V3 a))
    -> ST s (Vector a) -> ST s (Vector (V3 a))
    forall (m :: Type -> Type) a1 r.
    Monad m =>
    (a1 -> r) -> m a1 -> m r
    liftM ( Int -> Vector a -> Vector (V3 a)
    forall a. Int -> Vector a -> Vector (V3 a)
    V_V3 Int
    n) (Mutable Vector s a -> ST s (Vector a)
    forall s. Mutable Vector s a -> ST s (Vector a)
    forall (v :: Type -> Type) a s.
    Vector v a =>
    Mutable v s a -> ST s (v a)
    G.basicUnsafeFreeze MVector s a
    Mutable Vector s a
    v)
      basicUnsafeThaw :: forall s. Vector (V3 a) -> ST s (Mutable Vector s (V3 a))
    basicUnsafeThaw   ( V_V3 Int
    n Vector a
    v) = (MVector s a -> MVector s (V3 a))
    -> ST s (MVector s a) -> ST s (MVector s (V3 a))
    forall (m :: Type -> Type) a1 r.
    Monad m =>
    (a1 -> r) -> m a1 -> m r
    liftM (Int -> MVector s a -> MVector s (V3 a)
    forall s a. Int -> MVector s a -> MVector s (V3 a)
    MV_V3 Int
    n) (Vector a -> ST s (Mutable Vector s a)
    forall s. Vector a -> ST s (Mutable Vector s a)
    forall (v :: Type -> Type) a s.
    Vector v a =>
    v a -> ST s (Mutable v s a)
    G.basicUnsafeThaw   Vector a
    v)
      basicLength :: Vector (V3 a) -> Int
    basicLength       ( V_V3 Int
    n Vector a
    _) = Int
    n
      basicUnsafeSlice :: Int -> Int -> Vector (V3 a) -> Vector (V3 a)
    basicUnsafeSlice Int
    m Int
    n (V_V3 Int
    _ Vector a
    v) = Int -> Vector a -> Vector (V3 a)
    forall a. Int -> Vector a -> Vector (V3 a)
    V_V3 Int
    n (Int -> Int -> Vector a -> Vector a
    forall (v :: Type -> Type) a.
    Vector v a =>
    Int -> Int -> v a -> v a
    G.basicUnsafeSlice (Int
    3Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    m) (Int
    3Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    n) Vector a
    v)
      basicUnsafeIndexM :: Vector (V3 a) -> Int -> Box (V3 a)
    basicUnsafeIndexM (V_V3 Int
    _ Vector a
    v) Int
    i =
        do let o :: Int
    o = Int
    3Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    i
           a
    x <- Vector a -> Int -> Box a
    forall (v :: Type -> Type) a. Vector v a => v a -> Int -> Box a
    G.basicUnsafeIndexM Vector a
    v Int
    o
           a
    y <- Vector a -> Int -> Box a
    forall (v :: Type -> Type) a. Vector v a => v a -> Int -> Box a
    G.basicUnsafeIndexM Vector a
    v (Int
    oInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    1)
           a
    z <- Vector a -> Int -> Box a
    forall (v :: Type -> Type) a. Vector v a => v a -> Int -> Box a
    G.basicUnsafeIndexM Vector a
    v (Int
    oInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    2)
           V3 a -> Box (V3 a)
    forall a. a -> Box a
    forall (m :: Type -> Type) a. Monad m => a -> m a
    return (a -> a -> a -> V3 a
    forall a. a -> a -> a -> V3 a
    V3 a
    x a
    y a
    z)

    instance MonadZip V3 where
      mzipWith :: forall a b c. (a -> b -> c) -> V3 a -> V3 b -> V3 c
    mzipWith = (a -> b -> c) -> V3 a -> V3 b -> V3 c
    forall a b c. (a -> b -> c) -> V3 a -> V3 b -> V3 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2

    instance MonadFix V3 where
      mfix :: forall a. (a -> V3 a) -> V3 a
    mfix a -> V3 a
    f = a -> a -> a -> V3 a
    forall a. a -> a -> a -> V3 a
    V3 (let V3 a
    a a
    _ a
    _ = a -> V3 a
    f a
    a in a
    a)
                  (let V3 a
    _ a
    a a
    _ = a -> V3 a
    f a
    a in a
    a)
                  (let V3 a
    _ a
    _ a
    a = a -> V3 a
    f a
    a in a
    a)

    instance Bounded a => Bounded (V3 a) where
      minBound :: V3 a
    minBound = a -> V3 a
    forall a. a -> V3 a
    forall (f :: Type -> Type) a. Applicative f => a -> f a
    pure a
    forall a. Bounded a => a
    minBound
      {-# INLINE minBound #-}
      maxBound :: V3 a
    maxBound = a -> V3 a
    forall a. a -> V3 a
    forall (f :: Type -> Type) a. Applicative f => a -> f a
    pure a
    forall a. Bounded a => a
    maxBound
      {-# INLINE maxBound #-}

    -- | A 4-dimensional vector.
    data V4 a = V4 !a !a !a !a
      deriving (V4 a -> V4 a -> Bool
    (V4 a -> V4 a -> Bool) -> (V4 a -> V4 a -> Bool) -> Eq (V4 a)
    forall a. Eq a => V4 a -> V4 a -> Bool
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: forall a. Eq a => V4 a -> V4 a -> Bool
    == :: V4 a -> V4 a -> Bool
    $c/= :: forall a. Eq a => V4 a -> V4 a -> Bool
    /= :: V4 a -> V4 a -> Bool
    Eq, Eq (V4 a)
    Eq (V4 a) =>
    (V4 a -> V4 a -> Ordering)
    -> (V4 a -> V4 a -> Bool)
    -> (V4 a -> V4 a -> Bool)
    -> (V4 a -> V4 a -> Bool)
    -> (V4 a -> V4 a -> Bool)
    -> (V4 a -> V4 a -> V4 a)
    -> (V4 a -> V4 a -> V4 a)
    -> Ord (V4 a)
    V4 a -> V4 a -> Bool
    V4 a -> V4 a -> Ordering
    V4 a -> V4 a -> V4 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 (V4 a)
    forall a. Ord a => V4 a -> V4 a -> Bool
    forall a. Ord a => V4 a -> V4 a -> Ordering
    forall a. Ord a => V4 a -> V4 a -> V4 a
    $ccompare :: forall a. Ord a => V4 a -> V4 a -> Ordering
    compare :: V4 a -> V4 a -> Ordering
    $c< :: forall a. Ord a => V4 a -> V4 a -> Bool
    < :: V4 a -> V4 a -> Bool
    $c<= :: forall a. Ord a => V4 a -> V4 a -> Bool
    <= :: V4 a -> V4 a -> Bool
    $c> :: forall a. Ord a => V4 a -> V4 a -> Bool
    > :: V4 a -> V4 a -> Bool
    $c>= :: forall a. Ord a => V4 a -> V4 a -> Bool
    >= :: V4 a -> V4 a -> Bool
    $cmax :: forall a. Ord a => V4 a -> V4 a -> V4 a
    max :: V4 a -> V4 a -> V4 a
    $cmin :: forall a. Ord a => V4 a -> V4 a -> V4 a
    min :: V4 a -> V4 a -> V4 a
    Ord, Int -> V4 a -> ShowS
    [V4 a] -> ShowS
    V4 a -> String
    (Int -> V4 a -> ShowS)
    -> (V4 a -> String) -> ([V4 a] -> ShowS) -> Show (V4 a)
    forall a. Show a => Int -> V4 a -> ShowS
    forall a. Show a => [V4 a] -> ShowS
    forall a. Show a => V4 a -> String
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: forall a. Show a => Int -> V4 a -> ShowS
    showsPrec :: Int -> V4 a -> ShowS
    $cshow :: forall a. Show a => V4 a -> String
    show :: V4 a -> String
    $cshowList :: forall a. Show a => [V4 a] -> ShowS
    showList :: [V4 a] -> ShowS
    Show, ReadPrec [V4 a]
    ReadPrec (V4 a)
    Int -> ReadS (V4 a)
    ReadS [V4 a]
    (Int -> ReadS (V4 a))
    -> ReadS [V4 a]
    -> ReadPrec (V4 a)
    -> ReadPrec [V4 a]
    -> Read (V4 a)
    forall a. Read a => ReadPrec [V4 a]
    forall a. Read a => ReadPrec (V4 a)
    forall a. Read a => Int -> ReadS (V4 a)
    forall a. Read a => ReadS [V4 a]
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: forall a. Read a => Int -> ReadS (V4 a)
    readsPrec :: Int -> ReadS (V4 a)
    $creadList :: forall a. Read a => ReadS [V4 a]
    readList :: ReadS [V4 a]
    $creadPrec :: forall a. Read a => ReadPrec (V4 a)
    readPrec :: ReadPrec (V4 a)
    $creadListPrec :: forall a. Read a => ReadPrec [V4 a]
    readListPrec :: ReadPrec [V4 a]
    Read, Typeable (V4 a)
    Typeable (V4 a) =>
    (forall (c :: Type -> Type).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> V4 a -> c (V4 a))
    -> (forall (c :: Type -> Type).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c (V4 a))
    -> (V4 a -> Constr)
    -> (V4 a -> DataType)
    -> (forall (t :: Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c (V4 a)))
    -> (forall (t :: Type -> Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V4 a)))
    -> ((forall b. Data b => b -> b) -> V4 a -> V4 a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V4 a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V4 a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> V4 a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> V4 a -> u)
    -> (forall (m :: Type -> Type).
        Monad m =>
        (forall d. Data d => d -> m d) -> V4 a -> m (V4 a))
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> V4 a -> m (V4 a))
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> V4 a -> m (V4 a))
    -> Data (V4 a)
    V4 a -> Constr
    V4 a -> DataType
    (forall b. Data b => b -> b) -> V4 a -> V4 a
    forall a. Data a => Typeable (V4 a)
    forall a. Data a => V4 a -> Constr
    forall a. Data a => V4 a -> DataType
    forall a. Data a => (forall b. Data b => b -> b) -> V4 a -> V4 a
    forall a u.
    Data a =>
    Int -> (forall d. Data d => d -> u) -> V4 a -> u
    forall a u. Data a => (forall d. Data d => d -> u) -> V4 a -> [u]
    forall a r r'.
    Data a =>
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V4 a -> r
    forall a r r'.
    Data a =>
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V4 a -> r
    forall a (m :: Type -> Type).
    (Data a, Monad m) =>
    (forall d. Data d => d -> m d) -> V4 a -> m (V4 a)
    forall a (m :: Type -> Type).
    (Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> V4 a -> m (V4 a)
    forall a (c :: Type -> Type).
    Data a =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (V4 a)
    forall a (c :: Type -> Type).
    Data a =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> V4 a -> c (V4 a)
    forall a (t :: Type -> Type) (c :: Type -> Type).
    (Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (V4 a))
    forall a (t :: Type -> Type -> Type) (c :: Type -> Type).
    (Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V4 a))
    forall a.
    Typeable a =>
    (forall (c :: Type -> Type).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: Type -> Type).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: Type -> Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: Type -> Type).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> V4 a -> u
    forall u. (forall d. Data d => d -> u) -> V4 a -> [u]
    forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V4 a -> r
    forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V4 a -> r
    forall (m :: Type -> Type).
    Monad m =>
    (forall d. Data d => d -> m d) -> V4 a -> m (V4 a)
    forall (m :: Type -> Type).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> V4 a -> m (V4 a)
    forall (c :: Type -> Type).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (V4 a)
    forall (c :: Type -> Type).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> V4 a -> c (V4 a)
    forall (t :: Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (V4 a))
    forall (t :: Type -> Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V4 a))
    $cgfoldl :: forall a (c :: Type -> Type).
    Data a =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> V4 a -> c (V4 a)
    gfoldl :: forall (c :: Type -> Type).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> V4 a -> c (V4 a)
    $cgunfold :: forall a (c :: Type -> Type).
    Data a =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (V4 a)
    gunfold :: forall (c :: Type -> Type).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (V4 a)
    $ctoConstr :: forall a. Data a => V4 a -> Constr
    toConstr :: V4 a -> Constr
    $cdataTypeOf :: forall a. Data a => V4 a -> DataType
    dataTypeOf :: V4 a -> DataType
    $cdataCast1 :: forall a (t :: Type -> Type) (c :: Type -> Type).
    (Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (V4 a))
    dataCast1 :: forall (t :: Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (V4 a))
    $cdataCast2 :: forall a (t :: Type -> Type -> Type) (c :: Type -> Type).
    (Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V4 a))
    dataCast2 :: forall (t :: Type -> Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V4 a))
    $cgmapT :: forall a. Data a => (forall b. Data b => b -> b) -> V4 a -> V4 a
    gmapT :: (forall b. Data b => b -> b) -> V4 a -> V4 a
    $cgmapQl :: forall a r r'.
    Data a =>
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V4 a -> r
    gmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V4 a -> r
    $cgmapQr :: forall a r r'.
    Data a =>
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V4 a -> r
    gmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V4 a -> r
    $cgmapQ :: forall a u. Data a => (forall d. Data d => d -> u) -> V4 a -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> V4 a -> [u]
    $cgmapQi :: forall a u.
    Data a =>
    Int -> (forall d. Data d => d -> u) -> V4 a -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> V4 a -> u
    $cgmapM :: forall a (m :: Type -> Type).
    (Data a, Monad m) =>
    (forall d. Data d => d -> m d) -> V4 a -> m (V4 a)
    gmapM :: forall (m :: Type -> Type).
    Monad m =>
    (forall d. Data d => d -> m d) -> V4 a -> m (V4 a)
    $cgmapMp :: forall a (m :: Type -> Type).
    (Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> V4 a -> m (V4 a)
    gmapMp :: forall (m :: Type -> Type).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> V4 a -> m (V4 a)
    $cgmapMo :: forall a (m :: Type -> Type).
    (Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> V4 a -> m (V4 a)
    gmapMo :: forall (m :: Type -> Type).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> V4 a -> m (V4 a)
    Data, Typeable, (forall x. V4 a -> Rep (V4 a) x)
    -> (forall x. Rep (V4 a) x -> V4 a) -> Generic (V4 a)
    forall x. Rep (V4 a) x -> V4 a
    forall x. V4 a -> Rep (V4 a) x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    forall a x. Rep (V4 a) x -> V4 a
    forall a x. V4 a -> Rep (V4 a) x
    $cfrom :: forall a x. V4 a -> Rep (V4 a) x
    from :: forall x. V4 a -> Rep (V4 a) x
    $cto :: forall a x. Rep (V4 a) x -> V4 a
    to :: forall x. Rep (V4 a) x -> V4 a
    Generic, (forall a. V4 a -> Rep1 V4 a)
    -> (forall a. Rep1 V4 a -> V4 a) -> Generic1 V4
    forall a. Rep1 V4 a -> V4 a
    forall a. V4 a -> Rep1 V4 a
    forall k (f :: k -> Type).
    (forall (a :: k). f a -> Rep1 f a)
    -> (forall (a :: k). Rep1 f a -> f a) -> Generic1 f
    $cfrom1 :: forall a. V4 a -> Rep1 V4 a
    from1 :: forall a. V4 a -> Rep1 V4 a
    $cto1 :: forall a. Rep1 V4 a -> V4 a
    to1 :: forall a. Rep1 V4 a -> V4 a
    Generic1)

    instance Functor V4 where
      fmap :: forall a b. (a -> b) -> V4 a -> V4 b
    fmap a -> b
    f (V4 a
    a a
    b a
    c a
    d) = b -> b -> b -> b -> V4 b
    forall a. a -> a -> a -> a -> V4 a
    V4 (a -> b
    f a
    a) (a -> b
    f a
    b) (a -> b
    f a
    c) (a -> b
    f a
    d)
      {-# INLINE fmap #-}
      a
    a <$ :: forall a b. a -> V4 b -> V4 a
    <$ V4 b
    _ = a -> a -> a -> a -> V4 a
    forall a. a -> a -> a -> a -> V4 a
    V4 a
    a a
    a a
    a a
    a
      {-# INLINE (<$) #-}

    instance Foldable V4 where
      foldMap :: forall m a. Monoid m => (a -> m) -> V4 a -> m
    foldMap a -> m
    f (V4 a
    a a
    b a
    c a
    d) = a -> m
    f a
    a m -> m -> m
    forall a. Monoid a => a -> a -> a
    `mappend` a -> m
    f a
    b m -> m -> m
    forall a. Monoid a => a -> a -> a
    `mappend` a -> m
    f a
    c m -> m -> m
    forall a. Monoid a => a -> a -> a
    `mappend` a -> m
    f a
    d
      {-# INLINE foldMap #-}

    instance Traversable V4 where
      traverse :: forall (f :: Type -> Type) a b.
    Applicative f =>
    (a -> f b) -> V4 a -> f (V4 b)
    traverse a -> f b
    f (V4 a
    a a
    b a
    c a
    d) = b -> b -> b -> b -> V4 b
    forall a. a -> a -> a -> a -> V4 a
    V4 (b -> b -> b -> b -> V4 b) -> f b -> f (b -> b -> b -> V4 b)
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    <$> a -> f b
    f a
    a f (b -> b -> b -> V4 b) -> f b -> f (b -> b -> V4 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: Type -> Type) a b.
    Applicative f =>
    f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    b f (b -> b -> V4 b) -> f b -> f (b -> V4 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: Type -> Type) a b.
    Applicative f =>
    f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    c f (b -> V4 b) -> f b -> f (V4 b)
    forall a b. f (a -> b) -> f a -> f b
    forall (f :: Type -> Type) a b.
    Applicative f =>
    f (a -> b) -> f a -> f b
    <*> a -> f b
    f a
    d
      {-# INLINE traverse #-}

    instance Applicative V4 where
      pure :: forall a. a -> V4 a
    pure a
    a = a -> a -> a -> a -> V4 a
    forall a. a -> a -> a -> a -> V4 a
    V4 a
    a a
    a a
    a a
    a
      {-# INLINE pure #-}
      V4 a -> b
    a a -> b
    b a -> b
    c a -> b
    d <*> :: forall a b. V4 (a -> b) -> V4 a -> V4 b
    <*> V4 a
    e a
    f a
    g a
    h = b -> b -> b -> b -> V4 b
    forall a. a -> a -> a -> a -> V4 a
    V4 (a -> b
    a a
    e) (a -> b
    b a
    f) (a -> b
    c a
    g) (a -> b
    d a
    h)
      {-# INLINE (<*>) #-}

    instance Monad V4 where
      return :: forall a. a -> V4 a
    return = a -> V4 a
    forall a. a -> V4 a
    forall (f :: Type -> Type) a. Applicative f => a -> f a
    pure
      {-# INLINE return #-}
      V4 a
    a a
    b a
    c a
    d >>= :: forall a b. V4 a -> (a -> V4 b) -> V4 b
    >>= a -> V4 b
    f = b -> b -> b -> b -> V4 b
    forall a. a -> a -> a -> a -> V4 a
    V4 b
    a' b
    b' b
    c' b
    d' where
        V4 b
    a' b
    _ b
    _ b
    _ = a -> V4 b
    f a
    a
        V4 b
    _ b
    b' b
    _ b
    _ = a -> V4 b
    f a
    b
        V4 b
    _ b
    _ b
    c' b
    _ = a -> V4 b
    f a
    c
        V4 b
    _ b
    _ b
    _ b
    d' = a -> V4 b
    f a
    d
      {-# INLINE (>>=) #-}

    instance Num a => Num (V4 a) where
      + :: V4 a -> V4 a -> V4 a
    (+) = (a -> a -> a) -> V4 a -> V4 a -> V4 a
    forall a b c. (a -> b -> c) -> V4 a -> V4 b -> V4 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2 a -> a -> a
    forall a. Num a => a -> a -> a
    (+)
      {-# INLINE (+) #-}
      * :: V4 a -> V4 a -> V4 a
    (*) = (a -> a -> a) -> V4 a -> V4 a -> V4 a
    forall a b c. (a -> b -> c) -> V4 a -> V4 b -> V4 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2 a -> a -> a
    forall a. Num a => a -> a -> a
    (*)
      {-# INLINE (-) #-}
      (-) = (a -> a -> a) -> V4 a -> V4 a -> V4 a
    forall a b c. (a -> b -> c) -> V4 a -> V4 b -> V4 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2 (-)
      {-# INLINE (*) #-}
      negate :: V4 a -> V4 a
    negate = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Num a => a -> a
    negate
      {-# INLINE negate #-}
      abs :: V4 a -> V4 a
    abs = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Num a => a -> a
    abs
      {-# INLINE abs #-}
      signum :: V4 a -> V4 a
    signum = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Num a => a -> a
    signum
      {-# INLINE signum #-}
      fromInteger :: Integer -> V4 a
    fromInteger = a -> V4 a
    forall a. a -> V4 a
    forall (f :: Type -> Type) a. Applicative f => a -> f a
    pure (a -> V4 a) -> (Integer -> a) -> Integer -> V4 a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Integer -> a
    forall a. Num a => Integer -> a
    fromInteger
      {-# INLINE fromInteger #-}

    instance Fractional a => Fractional (V4 a) where
      recip :: V4 a -> V4 a
    recip = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Fractional a => a -> a
    recip
      {-# INLINE recip #-}
      / :: V4 a -> V4 a -> V4 a
    (/) = (a -> a -> a) -> V4 a -> V4 a -> V4 a
    forall a b c. (a -> b -> c) -> V4 a -> V4 b -> V4 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2 a -> a -> a
    forall a. Fractional a => a -> a -> a
    (/)
      {-# INLINE (/) #-}
      fromRational :: Rational -> V4 a
    fromRational = a -> V4 a
    forall a. a -> V4 a
    forall (f :: Type -> Type) a. Applicative f => a -> f a
    pure (a -> V4 a) -> (Rational -> a) -> Rational -> V4 a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Rational -> a
    forall a. Fractional a => Rational -> a
    fromRational
      {-# INLINE fromRational #-}

    instance Floating a => Floating (V4 a) where
        pi :: V4 a
    pi = a -> V4 a
    forall a. a -> V4 a
    forall (f :: Type -> Type) a. Applicative f => a -> f a
    pure a
    forall a. Floating a => a
    pi
        {-# INLINE pi #-}
        exp :: V4 a -> V4 a
    exp = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    exp
        {-# INLINE exp #-}
        sqrt :: V4 a -> V4 a
    sqrt = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    sqrt
        {-# INLINE sqrt #-}
        log :: V4 a -> V4 a
    log = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    log
        {-# INLINE log #-}
        ** :: V4 a -> V4 a -> V4 a
    (**) = (a -> a -> a) -> V4 a -> V4 a -> V4 a
    forall a b c. (a -> b -> c) -> V4 a -> V4 b -> V4 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2 a -> a -> a
    forall a. Floating a => a -> a -> a
    (**)
        {-# INLINE (**) #-}
        logBase :: V4 a -> V4 a -> V4 a
    logBase = (a -> a -> a) -> V4 a -> V4 a -> V4 a
    forall a b c. (a -> b -> c) -> V4 a -> V4 b -> V4 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2 a -> a -> a
    forall a. Floating a => a -> a -> a
    logBase
        {-# INLINE logBase #-}
        sin :: V4 a -> V4 a
    sin = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    sin
        {-# INLINE sin #-}
        tan :: V4 a -> V4 a
    tan = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    tan
        {-# INLINE tan #-}
        cos :: V4 a -> V4 a
    cos = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    cos
        {-# INLINE cos #-}
        asin :: V4 a -> V4 a
    asin = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    asin
        {-# INLINE asin #-}
        atan :: V4 a -> V4 a
    atan = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    atan
        {-# INLINE atan #-}
        acos :: V4 a -> V4 a
    acos = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    acos
        {-# INLINE acos #-}
        sinh :: V4 a -> V4 a
    sinh = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    sinh
        {-# INLINE sinh #-}
        tanh :: V4 a -> V4 a
    tanh = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    tanh
        {-# INLINE tanh #-}
        cosh :: V4 a -> V4 a
    cosh = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    cosh
        {-# INLINE cosh #-}
        asinh :: V4 a -> V4 a
    asinh = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    asinh
        {-# INLINE asinh #-}
        atanh :: V4 a -> V4 a
    atanh = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    atanh
        {-# INLINE atanh #-}
        acosh :: V4 a -> V4 a
    acosh = (a -> a) -> V4 a -> V4 a
    forall a b. (a -> b) -> V4 a -> V4 b
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> a
    forall a. Floating a => a -> a
    acosh
        {-# INLINE acosh #-}

    instance Storable a => Storable (V4 a) where
      sizeOf :: V4 a -> Int
    sizeOf V4 a
    _ = Int
    4 Int -> Int -> Int
    forall a. Num a => a -> a -> a
    * a -> Int
    forall a. Storable a => a -> Int
    sizeOf (a
    forall a. HasCallStack => a
    undefined::a)
      {-# INLINE sizeOf #-}
      alignment :: V4 a -> Int
    alignment V4 a
    _ = a -> Int
    forall a. Storable a => a -> Int
    alignment (a
    forall a. HasCallStack => a
    undefined::a)
      {-# INLINE alignment #-}
      poke :: Ptr (V4 a) -> V4 a -> IO ()
    poke Ptr (V4 a)
    ptr (V4 a
    x a
    y a
    z a
    w) = do Ptr a -> a -> IO ()
    forall a. Storable a => Ptr a -> a -> IO ()
    poke Ptr a
    ptr' a
    x
                                 Ptr a -> Int -> a -> IO ()
    forall a. Storable a => Ptr a -> Int -> a -> IO ()
    pokeElemOff Ptr a
    ptr' Int
    1 a
    y
                                 Ptr a -> Int -> a -> IO ()
    forall a. Storable a => Ptr a -> Int -> a -> IO ()
    pokeElemOff Ptr a
    ptr' Int
    2 a
    z
                                 Ptr a -> Int -> a -> IO ()
    forall a. Storable a => Ptr a -> Int -> a -> IO ()
    pokeElemOff Ptr a
    ptr' Int
    3 a
    w
        where ptr' :: Ptr a
    ptr' = Ptr (V4 a) -> Ptr a
    forall a b. Ptr a -> Ptr b
    castPtr Ptr (V4 a)
    ptr
      {-# INLINE poke #-}
      peek :: Ptr (V4 a) -> IO (V4 a)
    peek Ptr (V4 a)
    ptr = a -> a -> a -> a -> V4 a
    forall a. a -> a -> a -> a -> V4 a
    V4 (a -> a -> a -> a -> V4 a) -> IO a -> IO (a -> a -> a -> V4 a)
    forall (f :: Type -> Type) a b. Functor f => (a -> b) -> f a -> f b
    <$> Ptr a -> IO a
    forall a. Storable a => Ptr a -> IO a
    peek Ptr a
    ptr' IO (a -> a -> a -> V4 a) -> IO a -> IO (a -> a -> V4 a)
    forall a b. IO (a -> b) -> IO a -> IO b
    forall (f :: Type -> Type) a b.
    Applicative f =>
    f (a -> b) -> f a -> f b
    <*> Ptr a -> Int -> IO a
    forall a. Storable a => Ptr a -> Int -> IO a
    peekElemOff Ptr a
    ptr' Int
    1
                    IO (a -> a -> V4 a) -> IO a -> IO (a -> V4 a)
    forall a b. IO (a -> b) -> IO a -> IO b
    forall (f :: Type -> Type) a b.
    Applicative f =>
    f (a -> b) -> f a -> f b
    <*> Ptr a -> Int -> IO a
    forall a. Storable a => Ptr a -> Int -> IO a
    peekElemOff Ptr a
    ptr' Int
    2 IO (a -> V4 a) -> IO a -> IO (V4 a)
    forall a b. IO (a -> b) -> IO a -> IO b
    forall (f :: Type -> Type) a b.
    Applicative f =>
    f (a -> b) -> f a -> f b
    <*> Ptr a -> Int -> IO a
    forall a. Storable a => Ptr a -> Int -> IO a
    peekElemOff Ptr a
    ptr' Int
    3
        where ptr' :: Ptr a
    ptr' = Ptr (V4 a) -> Ptr a
    forall a b. Ptr a -> Ptr b
    castPtr Ptr (V4 a)
    ptr
      {-# INLINE peek #-}

    instance Ix a => Ix (V4 a) where
      {-# SPECIALISE instance Ix (V4 Int) #-}

      range :: (V4 a, V4 a) -> [V4 a]
    range (V4 a
    l1 a
    l2 a
    l3 a
    l4,V4 a
    u1 a
    u2 a
    u3 a
    u4) =
        [a -> a -> a -> a -> V4 a
    forall a. a -> a -> a -> a -> V4 a
    V4 a
    i1 a
    i2 a
    i3 a
    i4 | a
    i1 <- (a, a) -> [a]
    forall a. Ix a => (a, a) -> [a]
    range (a
    l1,a
    u1)
                        , a
    i2 <- (a, a) -> [a]
    forall a. Ix a => (a, a) -> [a]
    range (a
    l2,a
    u2)
                        , a
    i3 <- (a, a) -> [a]
    forall a. Ix a => (a, a) -> [a]
    range (a
    l3,a
    u3)
                        , a
    i4 <- (a, a) -> [a]
    forall a. Ix a => (a, a) -> [a]
    range (a
    l4,a
    u4)
                        ]
      {-# INLINE range #-}

      unsafeIndex :: (V4 a, V4 a) -> V4 a -> Int
    unsafeIndex (V4 a
    l1 a
    l2 a
    l3 a
    l4,V4 a
    u1 a
    u2 a
    u3 a
    u4) (V4 a
    i1 a
    i2 a
    i3 a
    i4) =
        (a, a) -> a -> Int
    forall a. Ix a => (a, a) -> a -> Int
    unsafeIndex (a
    l4,a
    u4) a
    i4 Int -> Int -> Int
    forall a. Num a => a -> a -> a
    + (a, a) -> Int
    forall a. Ix a => (a, a) -> Int
    unsafeRangeSize (a
    l4,a
    u4) Int -> Int -> Int
    forall a. Num a => a -> a -> a
    * (
        (a, a) -> a -> Int
    forall a. Ix a => (a, a) -> a -> Int
    unsafeIndex (a
    l3,a
    u3) a
    i3 Int -> Int -> Int
    forall a. Num a => a -> a -> a
    + (a, a) -> Int
    forall a. Ix a => (a, a) -> Int
    unsafeRangeSize (a
    l3,a
    u3) Int -> Int -> Int
    forall a. Num a => a -> a -> a
    * (
        (a, a) -> a -> Int
    forall a. Ix a => (a, a) -> a -> Int
    unsafeIndex (a
    l2,a
    u2) a
    i2 Int -> Int -> Int
    forall a. Num a => a -> a -> a
    + (a, a) -> Int
    forall a. Ix a => (a, a) -> Int
    unsafeRangeSize (a
    l2,a
    u2) Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *
        (a, a) -> a -> Int
    forall a. Ix a => (a, a) -> a -> Int
    unsafeIndex (a
    l1,a
    u1) a
    i1))
      {-# INLINE unsafeIndex #-}

      inRange :: (V4 a, V4 a) -> V4 a -> Bool
    inRange (V4 a
    l1 a
    l2 a
    l3 a
    l4,V4 a
    u1 a
    u2 a
    u3 a
    u4) (V4 a
    i1 a
    i2 a
    i3 a
    i4) =
        (a, a) -> a -> Bool
    forall a. Ix a => (a, a) -> a -> Bool
    inRange (a
    l1,a
    u1) a
    i1 Bool -> Bool -> Bool
    && (a, a) -> a -> Bool
    forall a. Ix a => (a, a) -> a -> Bool
    inRange (a
    l2,a
    u2) a
    i2 Bool -> Bool -> Bool
    &&
        (a, a) -> a -> Bool
    forall a. Ix a => (a, a) -> a -> Bool
    inRange (a
    l3,a
    u3) a
    i3 Bool -> Bool -> Bool
    && (a, a) -> a -> Bool
    forall a. Ix a => (a, a) -> a -> Bool
    inRange (a
    l4,a
    u4) a
    i4
      {-# INLINE inRange #-}

    data instance U.Vector    (V4 a) =  V_V4 {-# UNPACK #-} !Int !(U.Vector    a)
    data instance U.MVector s (V4 a) = MV_V4 {-# UNPACK #-} !Int !(U.MVector s a)
    instance U.Unbox a => U.Unbox (V4 a)

    instance U.Unbox a => M.MVector U.MVector (V4 a) where
      basicLength :: forall s. MVector s (V4 a) -> Int
    basicLength (MV_V4 Int
    n MVector s a
    _) = Int
    n
      basicUnsafeSlice :: forall s. Int -> Int -> MVector s (V4 a) -> MVector s (V4 a)
    basicUnsafeSlice Int
    m Int
    n (MV_V4 Int
    _ MVector s a
    v) = Int -> MVector s a -> MVector s (V4 a)
    forall s a. Int -> MVector s a -> MVector s (V4 a)
    MV_V4 Int
    n (Int -> Int -> MVector s a -> MVector s a
    forall s. Int -> Int -> MVector s a -> MVector s a
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    Int -> Int -> v s a -> v s a
    M.basicUnsafeSlice (Int
    4Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    m) (Int
    4Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    n) MVector s a
    v)
      basicOverlaps :: forall s. MVector s (V4 a) -> MVector s (V4 a) -> Bool
    basicOverlaps (MV_V4 Int
    _ MVector s a
    v) (MV_V4 Int
    _ MVector s a
    u) = MVector s a -> MVector s a -> Bool
    forall s. MVector s a -> MVector s a -> Bool
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> v s a -> Bool
    M.basicOverlaps MVector s a
    v MVector s a
    u
      basicUnsafeNew :: forall s. Int -> ST s (MVector s (V4 a))
    basicUnsafeNew Int
    n = (MVector s a -> MVector s (V4 a))
    -> ST s (MVector s a) -> ST s (MVector s (V4 a))
    forall (m :: Type -> Type) a1 r.
    Monad m =>
    (a1 -> r) -> m a1 -> m r
    liftM (Int -> MVector s a -> MVector s (V4 a)
    forall s a. Int -> MVector s a -> MVector s (V4 a)
    MV_V4 Int
    n) (Int -> ST s (MVector s a)
    forall s. Int -> ST s (MVector s a)
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    Int -> ST s (v s a)
    M.basicUnsafeNew (Int
    4Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    n))
      basicUnsafeRead :: forall s. MVector s (V4 a) -> Int -> ST s (V4 a)
    basicUnsafeRead (MV_V4 Int
    _ MVector s a
    v) Int
    i =
        do let o :: Int
    o = Int
    4Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    i
           a
    x <- MVector s a -> Int -> ST s a
    forall s. MVector s a -> Int -> ST s a
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> ST s a
    M.basicUnsafeRead MVector s a
    v Int
    o
           a
    y <- MVector s a -> Int -> ST s a
    forall s. MVector s a -> Int -> ST s a
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> ST s a
    M.basicUnsafeRead MVector s a
    v (Int
    oInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    1)
           a
    z <- MVector s a -> Int -> ST s a
    forall s. MVector s a -> Int -> ST s a
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> ST s a
    M.basicUnsafeRead MVector s a
    v (Int
    oInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    2)
           a
    w <- MVector s a -> Int -> ST s a
    forall s. MVector s a -> Int -> ST s a
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> ST s a
    M.basicUnsafeRead MVector s a
    v (Int
    oInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    3)
           V4 a -> ST s (V4 a)
    forall a. a -> ST s a
    forall (m :: Type -> Type) a. Monad m => a -> m a
    return (a -> a -> a -> a -> V4 a
    forall a. a -> a -> a -> a -> V4 a
    V4 a
    x a
    y a
    z a
    w)
      basicUnsafeWrite :: forall s. MVector s (V4 a) -> Int -> V4 a -> ST s ()
    basicUnsafeWrite (MV_V4 Int
    _ MVector s a
    v) Int
    i (V4 a
    x a
    y a
    z a
    w) =
        do let o :: Int
    o = Int
    4Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    i
           MVector s a -> Int -> a -> ST s ()
    forall s. MVector s a -> Int -> a -> ST s ()
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> a -> ST s ()
    M.basicUnsafeWrite MVector s a
    v Int
    o     a
    x
           MVector s a -> Int -> a -> ST s ()
    forall s. MVector s a -> Int -> a -> ST s ()
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> a -> ST s ()
    M.basicUnsafeWrite MVector s a
    v (Int
    oInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    1) a
    y
           MVector s a -> Int -> a -> ST s ()
    forall s. MVector s a -> Int -> a -> ST s ()
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> a -> ST s ()
    M.basicUnsafeWrite MVector s a
    v (Int
    oInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    2) a
    z
           MVector s a -> Int -> a -> ST s ()
    forall s. MVector s a -> Int -> a -> ST s ()
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> Int -> a -> ST s ()
    M.basicUnsafeWrite MVector s a
    v (Int
    oInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    3) a
    w
    #if MIN_VERSION_vector(0,11,0)
      basicInitialize :: forall s. MVector s (V4 a) -> ST s ()
    basicInitialize (MV_V4 Int
    _ MVector s a
    v) = MVector s a -> ST s ()
    forall s. MVector s a -> ST s ()
    forall (v :: Type -> Type -> Type) a s.
    MVector v a =>
    v s a -> ST s ()
    M.basicInitialize MVector s a
    v
    #endif

    instance U.Unbox a => G.Vector U.Vector (V4 a) where
      basicUnsafeFreeze :: forall s. Mutable Vector s (V4 a) -> ST s (Vector (V4 a))
    basicUnsafeFreeze (MV_V4 Int
    n MVector s a
    v) = (Vector a -> Vector (V4 a))
    -> ST s (Vector a) -> ST s (Vector (V4 a))
    forall (m :: Type -> Type) a1 r.
    Monad m =>
    (a1 -> r) -> m a1 -> m r
    liftM ( Int -> Vector a -> Vector (V4 a)
    forall a. Int -> Vector a -> Vector (V4 a)
    V_V4 Int
    n) (Mutable Vector s a -> ST s (Vector a)
    forall s. Mutable Vector s a -> ST s (Vector a)
    forall (v :: Type -> Type) a s.
    Vector v a =>
    Mutable v s a -> ST s (v a)
    G.basicUnsafeFreeze MVector s a
    Mutable Vector s a
    v)
      basicUnsafeThaw :: forall s. Vector (V4 a) -> ST s (Mutable Vector s (V4 a))
    basicUnsafeThaw   ( V_V4 Int
    n Vector a
    v) = (MVector s a -> MVector s (V4 a))
    -> ST s (MVector s a) -> ST s (MVector s (V4 a))
    forall (m :: Type -> Type) a1 r.
    Monad m =>
    (a1 -> r) -> m a1 -> m r
    liftM (Int -> MVector s a -> MVector s (V4 a)
    forall s a. Int -> MVector s a -> MVector s (V4 a)
    MV_V4 Int
    n) (Vector a -> ST s (Mutable Vector s a)
    forall s. Vector a -> ST s (Mutable Vector s a)
    forall (v :: Type -> Type) a s.
    Vector v a =>
    v a -> ST s (Mutable v s a)
    G.basicUnsafeThaw   Vector a
    v)
      basicLength :: Vector (V4 a) -> Int
    basicLength       ( V_V4 Int
    n Vector a
    _) = Int
    n
      basicUnsafeSlice :: Int -> Int -> Vector (V4 a) -> Vector (V4 a)
    basicUnsafeSlice Int
    m Int
    n (V_V4 Int
    _ Vector a
    v) = Int -> Vector a -> Vector (V4 a)
    forall a. Int -> Vector a -> Vector (V4 a)
    V_V4 Int
    n (Int -> Int -> Vector a -> Vector a
    forall (v :: Type -> Type) a.
    Vector v a =>
    Int -> Int -> v a -> v a
    G.basicUnsafeSlice (Int
    4Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    m) (Int
    4Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    n) Vector a
    v)
      basicUnsafeIndexM :: Vector (V4 a) -> Int -> Box (V4 a)
    basicUnsafeIndexM (V_V4 Int
    _ Vector a
    v) Int
    i =
        do let o :: Int
    o = Int
    4Int -> Int -> Int
    forall a. Num a => a -> a -> a
    *Int
    i
           a
    x <- Vector a -> Int -> Box a
    forall (v :: Type -> Type) a. Vector v a => v a -> Int -> Box a
    G.basicUnsafeIndexM Vector a
    v Int
    o
           a
    y <- Vector a -> Int -> Box a
    forall (v :: Type -> Type) a. Vector v a => v a -> Int -> Box a
    G.basicUnsafeIndexM Vector a
    v (Int
    oInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    1)
           a
    z <- Vector a -> Int -> Box a
    forall (v :: Type -> Type) a. Vector v a => v a -> Int -> Box a
    G.basicUnsafeIndexM Vector a
    v (Int
    oInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    2)
           a
    w <- Vector a -> Int -> Box a
    forall (v :: Type -> Type) a. Vector v a => v a -> Int -> Box a
    G.basicUnsafeIndexM Vector a
    v (Int
    oInt -> Int -> Int
    forall a. Num a => a -> a -> a
    +Int
    3)
           V4 a -> Box (V4 a)
    forall a. a -> Box a
    forall (m :: Type -> Type) a. Monad m => a -> m a
    return (a -> a -> a -> a -> V4 a
    forall a. a -> a -> a -> a -> V4 a
    V4 a
    x a
    y a
    z a
    w)

    instance MonadZip V4 where
      mzipWith :: forall a b c. (a -> b -> c) -> V4 a -> V4 b -> V4 c
    mzipWith = (a -> b -> c) -> V4 a -> V4 b -> V4 c
    forall a b c. (a -> b -> c) -> V4 a -> V4 b -> V4 c
    forall (f :: Type -> Type) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    liftA2

    instance MonadFix V4 where
      mfix :: forall a. (a -> V4 a) -> V4 a
    mfix a -> V4 a
    f = a -> a -> a -> a -> V4 a
    forall a. a -> a -> a -> a -> V4 a
    V4 (let V4 a
    a a
    _ a
    _ a
    _ = a -> V4 a
    f a
    a in a
    a)
                  (let V4 a
    _ a
    a a
    _ a
    _ = a -> V4 a
    f a
    a in a
    a)
                  (let V4 a
    _ a
    _ a
    a a
    _ = a -> V4 a
    f a
    a in a
    a)
                  (let V4 a
    _ a
    _ a
    _ a
    a = a -> V4 a
    f a
    a in a
    a)

    instance Bounded a => Bounded (V4 a) where
      minBound :: V4 a
    minBound = a -> V4 a
    forall a. a -> V4 a
    forall (f :: Type -> Type) a. Applicative f => a -> f a
    pure a
    forall a. Bounded a => a
    minBound
      {-# INLINE minBound #-}
      maxBound :: V4 a
    maxBound = a -> V4 a
    forall a. a -> V4 a
    forall (f :: Type -> Type) a. Applicative f => a -> f a
    pure a
    forall a. Bounded a => a
    maxBound
      {-# INLINE maxBound #-}