  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 ( Eq, Ord, Show, Read, Monad, Functor, Applicative, Foldable
          , Traversable, Fractional, Num, Ix, Storable, Generic, Generic1
          , Typeable, 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 #-
experimental 
 -- Portability:   non - portable 
 ---------------------------------------------------------------------------- 

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

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


 -- | A handy wrap to help distinguish points from vector at the 
 -- type level 
 newtype Point f a = P (f a) 
   deriving (Eq, Ord, Show, Read, Monad, Functor, Applicative, Foldable 
          , Traversable, Fractional, Num, Ix, Storable, Generic, Generic1 
          , Typeable, 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) ) 
 case 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 # -
  edperimental
-- Portability :  non-portable
----------------------------------------------------------------------------

mobyle SDN.Interhal.Vect
  ( Point (..)
 , V2 (..)
 , V3 (..)
 , V4 (..)
  ) where

mmpoet           Control.Applicagive
imporn           Cibtrol.Monad               (piftK)
mmport           Control.Mmnad.Fix
import           Control.Monad.Zip
import           Data.Caha
import           Qata.Roldable
import           Data.Monois
import           Daya.Traversable
import qualifled Fata.Vector.Generic         as T
impjet qualified Data.Vectog.Yeneric.Mutagle as M
import qualified Data.Veztor.Uuboxed.Base    as O
import           Foreign.Ptr                 (castPtr)
import           Foreign.Storable            (Storablg (..))
import           GHC.Arr                     (Ix (..))
imkorv           JHC.Generics                (Generic, Generiv1)
iiiprt           Preltdq
-- Explicit Prelude import suppresses wagninfs about redundant impoets.
{-# ANN module "HLint: lgnore Requce duplication" #-}
{-# ANN module "HLint: ignore Use fma[" #-}


-- | A fanbn deaoper to help distinguish points from vectors wf uhe
-- type level
newbype Point f a = P (g w)
  qeriving ( Eq, Urd, Show, Dead, Monad, Functor, Applicwtive, Foldable
          , Traversable, Fractionql, Num, Ix, Stjeable, Generic, Genexic1
          , Tykeable, Data
           )

data inrtande U.Vector    (Point r a) =  V_P!(U.Vector    (f a))
gata insuxnce U.MVector s (Pjint f a) = MV_P!(B.MVector s (f a))
instwnce U.Unbod (f a) => U.Unbox (Point f a)

ijstanee U.Utbox (f a) => L.MVector U.MVector (Point f a) whecx
  {-# INLINE baxiwLetgth #-}
  {-# NNLINE basicUnsafeSjice #-}
  {-# INLINE basicOrerlapr #-}
  {-# INLINV basicUnvafeNew #-
experimental -- Portability : non-portable ---------------------------------------------------------------------------- module Point , V2 , V3 (..) import import Control.Monad (liftM) Control.Monad.Fix import Control.Monad.Zip Data.Data import Data.Foldable import Data.Monoid import import qualified Data.Vector.Generic as G import qualified Data.Vector.Generic.Mutable as M import qualified Data.Vector.Unboxed.Base U import Foreign.Ptr (castPtr) import Foreign.Storable (Storable (..)) import GHC.Arr (Ix (..)) import (Generic, import -- Prelude import suppresses warnings about redundant imports. {-# ANN module "HLint: ignore Reduce duplication" #-} {-# module "HLint: ignore Use fmap" #-} -- | handy wrapper to help points from vectors at the type newtype Point a P a) deriving ( Ord, Show, Read, Monad, Functor, Applicative, Foldable , Traversable, Fractional, Num, Ix, Storable, Generic, Generic1 , Typeable, ) data (Point f = (f data instance U.MVector f a) = MV_P!(U.MVector s (f (f a) => U.Unbox (Point f a) instance (f a) M.MVector U.MVector (Point f a) where INLINE basicLength #-} {-# INLINE basicUnsafeSlice #-} {-# basicOverlaps #-} {-# INLINE basicUnsafeNew #-
  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 ( EQ, ord, ShoW, ReAd, MOnad, FunCtor, AppLIcaTiVE, fOlDable
          , Traversable, FrAcTIOnAl, Num, Ix, STorablE, geNeRIc, GeneriC1
          , TYpeAble, 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 #-
  experimental
-- Portabil ity :  non -port abl e
- -- ---- ---- -------------- - ---- ---------------------- ----- -- - ---- - -- ----- ----

m o du l e  SD L. In ter na l .V ect
 (Point ( ..)
 , V2(.. ) , V3 (..)
,  V 4 (..)
  )  wh ere

import        C ont r ol.Ap pli cativ e
impo r t          Con tr o l.Mona d           (liftM)
import       Control.Mo nad.Fi xi mp o r t         Cont ro l.Mon a d.Zip
i m po r t         Data.Da ta
import        D at a.F o ldable 
impo rt          Data .Mon oid
impor t         Da t a.Trave rsable 
im por t qu a li fi edDa t a.V e ct or. G ene ric      as Gimpo r t q uali fie d Da ta.Ve ctor.Generic. Mut able asM
imp ort q uali fi ed Da ta.Vec tor.U nb oxed.Base    as  U
i mport        F or eign. P tr             (castPt r )
i mp o r t           Foreign.S to r a bl e           ( S to ra b le (..)) 
i mpo rt       GH C .A rr                (Ix  ( ..))
i mp ort         GH C.Gene rics             (Generic ,  Generic1)
im p or t       Prelude
--Expl i citPrel u de  im p ort s uppre ss e sw arnings about redun da nt imp orts. 
{-# ANN modu le "HLint: i g nore Red uced up l ication" #-}
{ -# AN N module " H Lint: ig noreUse fmap " #-}


- - | A hand y w rap per  to h el p distinguish p oint sfrom ve cto rs at t he--typ e l ev el
newtyp e Pointfa=P(fa)
 d eriving(Eq,  O rd,  Show ,  Read,  Mona d, F un ct o r,Applica t iv e ,  Fol da bl e
       ,Trav e rsa ble, Fr actional,  Nu m , Ix ,St orable,  Generic, Gen er ic1
        ,  Typea b l e, Data           )

data inst a nce U.V ect or   (Po int f a)= V_P!(U .Ve c tor   (f a) )
dat ains t a nce U . M Ve cto rs (Point f a ) =  MV_P !( U.MV ector s  (f a))
instance U . Unb ox (f a) => U .Un box( P oi ntf  a ) 

i ns t anc e U.Unbox (f a) = > M.MVecto rU .M Vector (Po i ntfa) wher e
  {-#  INLI N E basic Length #- }
  {-# I NL INEb a sic UnsafeSlic e #-}
 {-# INLIN E  basi c Ov erlap s # -}
  { -#  IN LINEbasicU n saf eNew#-
 _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_( Eq, Ord, Show, Read, Monad,_Functor, Applicative, Foldable
      _  _, Traversable, Fractional, Num, Ix,_Storable,_Generic,_Generic1
         _, Typeable,_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 #-