-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Linear Algebra
--   
--   Types and combinators for linear algebra on free vector spaces
@package linear
@version 1.23.2

-- | Serialization of statically-sized types with the Data.Binary
--   library.
module Linear.Binary

-- | Serialize a linear type.
putLinear :: (Binary a, Foldable t) => t a -> Put

-- | Deserialize a linear type.
getLinear :: (Binary a, Applicative t, Traversable t) => Get (t a)

-- | Involutive rings
module Linear.Conjugate

-- | An involutive ring
class Num a => Conjugate a

-- | Conjugate a value. This defaults to the trivial involution.
--   
--   
--   >>> conjugate (1 :+ 2)
--   1.0 :+ (-2.0)
--   
--   
--   
--   >>> conjugate 1
--   1
--   
conjugate :: Conjugate a => a -> a
($dmconjugate) :: (Conjugate a, TrivialConjugate a) => a -> a

-- | Requires and provides a default definition such that
--   
--   
--   conjugate = id
--   
class Conjugate a => TrivialConjugate a
instance Linear.Conjugate.Conjugate GHC.Internal.Foreign.C.Types.CDouble
instance Linear.Conjugate.Conjugate GHC.Internal.Foreign.C.Types.CFloat
instance (Linear.Conjugate.Conjugate a, GHC.Internal.Float.RealFloat a) => Linear.Conjugate.Conjugate (Data.Complex.Complex a)
instance Linear.Conjugate.Conjugate GHC.Types.Double
instance Linear.Conjugate.Conjugate GHC.Types.Float
instance Linear.Conjugate.Conjugate GHC.Types.Int
instance Linear.Conjugate.Conjugate GHC.Internal.Int.Int16
instance Linear.Conjugate.Conjugate GHC.Internal.Int.Int32
instance Linear.Conjugate.Conjugate GHC.Internal.Int.Int64
instance Linear.Conjugate.Conjugate GHC.Internal.Int.Int8
instance Linear.Conjugate.Conjugate GHC.Num.Integer.Integer
instance Linear.Conjugate.Conjugate GHC.Types.Word
instance Linear.Conjugate.Conjugate GHC.Internal.Word.Word16
instance Linear.Conjugate.Conjugate GHC.Internal.Word.Word32
instance Linear.Conjugate.Conjugate GHC.Internal.Word.Word64
instance Linear.Conjugate.Conjugate GHC.Internal.Word.Word8
instance Linear.Conjugate.TrivialConjugate GHC.Internal.Foreign.C.Types.CDouble
instance Linear.Conjugate.TrivialConjugate GHC.Internal.Foreign.C.Types.CFloat
instance Linear.Conjugate.TrivialConjugate GHC.Types.Double
instance Linear.Conjugate.TrivialConjugate GHC.Types.Float
instance Linear.Conjugate.TrivialConjugate GHC.Types.Int
instance Linear.Conjugate.TrivialConjugate GHC.Internal.Int.Int16
instance Linear.Conjugate.TrivialConjugate GHC.Internal.Int.Int32
instance Linear.Conjugate.TrivialConjugate GHC.Internal.Int.Int64
instance Linear.Conjugate.TrivialConjugate GHC.Internal.Int.Int8
instance Linear.Conjugate.TrivialConjugate GHC.Num.Integer.Integer
instance Linear.Conjugate.TrivialConjugate GHC.Types.Word
instance Linear.Conjugate.TrivialConjugate GHC.Internal.Word.Word16
instance Linear.Conjugate.TrivialConjugate GHC.Internal.Word.Word32
instance Linear.Conjugate.TrivialConjugate GHC.Internal.Word.Word64
instance Linear.Conjugate.TrivialConjugate GHC.Internal.Word.Word8

-- | Testing for values "near" zero
module Linear.Epsilon

-- | Provides a fairly subjective test to see if a quantity is near zero.
--   
--   
--   >>> nearZero (1e-11 :: Double)
--   False
--   
--   
--   
--   >>> nearZero (1e-17 :: Double)
--   True
--   
--   
--   
--   >>> nearZero (1e-5 :: Float)
--   False
--   
--   
--   
--   >>> nearZero (1e-7 :: Float)
--   True
--   
class Num a => Epsilon a

-- | Determine if a quantity is near zero.
nearZero :: Epsilon a => a -> Bool
instance Linear.Epsilon.Epsilon GHC.Internal.Foreign.C.Types.CDouble
instance Linear.Epsilon.Epsilon GHC.Internal.Foreign.C.Types.CFloat
instance (Linear.Epsilon.Epsilon a, GHC.Internal.Float.RealFloat a) => Linear.Epsilon.Epsilon (Data.Complex.Complex a)
instance Linear.Epsilon.Epsilon GHC.Types.Double
instance Linear.Epsilon.Epsilon GHC.Types.Float

-- | Re-exports orphan instances for Complex from the
--   base-orphans package.
module Linear.Instances

-- | Operations on free vector spaces.
module Linear.Vector

-- | A vector is an additive group with additional structure.
class Functor f => Additive (f :: Type -> Type)

-- | The zero vector
zero :: (Additive f, Num a) => f a
($dmzero) :: (Additive f, GAdditive (Rep1 f), Generic1 f, Num a) => f a

-- | Compute the sum of two vectors
--   
--   
--   >>> V2 1 2 ^+^ V2 3 4
--   V2 4 6
--   
(^+^) :: (Additive f, Num a) => f a -> f a -> f a

-- | Compute the difference between two vectors
--   
--   
--   >>> V2 4 5 ^-^ V2 3 1
--   V2 1 4
--   
(^-^) :: (Additive f, Num a) => f a -> f a -> f a

-- | Linearly interpolate between two vectors.
--   
--   Since linear version 1.23, interpolation direction has been
--   reversed; now
--   
--   
--   lerp 0 a b == a
--   lerp 1 a b == b
--   
lerp :: (Additive f, Num a) => a -> f a -> f a -> f a

-- | Apply a function to merge the 'non-zero' components of two vectors,
--   unioning the rest of the values.
--   
--   
--   
- For a dense vector this is equivalent to liftA2.
--   
- For a sparse vector this is equivalent to unionWith.
--   
liftU2 :: Additive f => (a -> a -> a) -> f a -> f a -> f a
($dmliftU2) :: (Additive f, Applicative f) => (a -> a -> a) -> f a -> f a -> f a

-- | Apply a function to the components of two vectors.
--   
--   
--   
- For a dense vector this is equivalent to liftA2.
--   
- For a sparse vector this is equivalent to
--   intersectionWith.
--   
liftI2 :: Additive f => (a -> b -> c) -> f a -> f b -> f c
($dmliftI2) :: (Additive f, Applicative f) => (a -> b -> c) -> f a -> f b -> f c
infixl 6 ^+^
infixl 6 ^-^

-- | Basis element
newtype E (t :: Type -> Type)
E :: (forall x. () => Lens' (t x) x) -> E (t :: Type -> Type)
[el] :: E (t :: Type -> Type) -> forall x. () => Lens' (t x) x

-- | Compute the negation of a vector
--   
--   
--   >>> negated (V2 2 4)
--   V2 (-2) (-4)
--   
negated :: (Functor f, Num a) => f a -> f a

-- | Compute the right scalar product
--   
--   
--   >>> V2 3 4 ^* 2
--   V2 6 8
--   
(^*) :: (Functor f, Num a) => f a -> a -> f a
infixl 7 ^*

-- | Compute the left scalar product
--   
--   
--   >>> 2 *^ V2 3 4
--   V2 6 8
--   
(*^) :: (Functor f, Num a) => a -> f a -> f a
infixl 7 *^

-- | Compute division by a scalar on the right.
(^/) :: (Functor f, Fractional a) => f a -> a -> f a
infixl 7 ^/

-- | Sum over multiple vectors
--   
--   
--   >>> sumV [V2 1 1, V2 3 4]
--   V2 4 5
--   
sumV :: (Foldable f, Additive v, Num a) => f (v a) -> v a

-- | Produce a default basis for a vector space. If the dimensionality of
--   the vector space is not statically known, see basisFor.
basis :: (Additive t, Traversable t, Num a) => [t a]

-- | Produce a default basis for a vector space from which the argument is
--   drawn.
basisFor :: (Traversable t, Num a) => t b -> [t a]

-- | Produce a diagonal (scale) matrix from a vector.
--   
--   
--   >>> scaled (V2 2 3)
--   V2 (V2 2 0) (V2 0 3)
--   
scaled :: (Traversable t, Num a) => t a -> t (t a)

-- | Outer (tensor) product of two vectors
outer :: (Functor f, Functor g, Num a) => f a -> g a -> f (g a)

-- | Create a unit vector.
--   
--   
--   >>> unit _x :: V2 Int
--   V2 1 0
--   
unit :: (Additive t, Num a) => ASetter' (t a) a -> t a
instance Linear.Vector.Additive Data.Complex.Complex
instance (Linear.Vector.Additive f, Linear.Vector.Additive g) => Linear.Vector.Additive (Data.Functor.Compose.Compose f g)
instance Linear.Vector.Additive ((->) b)
instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k) => Linear.Vector.Additive (Data.HashMap.Internal.HashMap k)
instance Linear.Vector.Additive GHC.Internal.Data.Functor.Identity.Identity
instance Linear.Vector.Additive Data.IntMap.Internal.IntMap
instance Linear.Vector.Additive []
instance GHC.Classes.Ord k => Linear.Vector.Additive (Data.Map.Internal.Map k)
instance Linear.Vector.Additive GHC.Internal.Maybe.Maybe
instance (Linear.Vector.Additive f, Linear.Vector.Additive g) => Linear.Vector.Additive (Data.Functor.Product.Product f g)
instance Linear.Vector.Additive Data.Vector.Vector
instance Linear.Vector.Additive GHC.Internal.Functor.ZipList.ZipList
instance (Linear.Vector.GAdditive f, Linear.Vector.GAdditive g) => Linear.Vector.GAdditive (f GHC.Internal.Generics.:*: g)
instance (Linear.Vector.Additive f, Linear.Vector.GAdditive g) => Linear.Vector.GAdditive (f GHC.Internal.Generics.:.: g)
instance Linear.Vector.GAdditive f => Linear.Vector.GAdditive (GHC.Internal.Generics.M1 i c f)
instance Linear.Vector.GAdditive GHC.Internal.Generics.Par1
instance Linear.Vector.Additive f => Linear.Vector.GAdditive (GHC.Internal.Generics.Rec1 f)
instance Linear.Vector.GAdditive GHC.Internal.Generics.U1

-- | Free metric spaces
module Linear.Metric

-- | Free and sparse inner product/metric spaces.
class Additive f => Metric (f :: Type -> Type)

-- | Compute the inner product of two vectors or (equivalently) convert a
--   vector f a into a covector f a -> a.
--   
--   
--   >>> V2 1 2 `dot` V2 3 4
--   11
--   
dot :: (Metric f, Num a) => f a -> f a -> a
($dmdot) :: (Metric f, Foldable f, Num a) => f a -> f a -> a

-- | Compute the squared norm. The name quadrance arises from Norman J.
--   Wildberger's rational trigonometry.
quadrance :: (Metric f, Num a) => f a -> a

-- | Compute the quadrance of the difference
qd :: (Metric f, Num a) => f a -> f a -> a

-- | Compute the distance between two vectors in a metric space
distance :: (Metric f, Floating a) => f a -> f a -> a

-- | Compute the norm of a vector in a metric space
norm :: (Metric f, Floating a) => f a -> a

-- | Convert a non-zero vector to unit vector.
signorm :: (Metric f, Floating a) => f a -> f a

-- | Normalize a Metric functor to have unit norm. This
--   function does not change the functor if its norm is 0 or 1.
normalize :: (Floating a, Metric f, Epsilon a) => f a -> f a

-- | project u v computes the projection of v onto
--   u.
project :: (Metric v, Fractional a) => v a -> v a -> v a
instance (Linear.Metric.Metric f, Linear.Metric.Metric g) => Linear.Metric.Metric (Data.Functor.Compose.Compose f g)
instance (Data.Hashable.Class.Hashable k, GHC.Classes.Eq k) => Linear.Metric.Metric (Data.HashMap.Internal.HashMap k)
instance Linear.Metric.Metric GHC.Internal.Data.Functor.Identity.Identity
instance Linear.Metric.Metric Data.IntMap.Internal.IntMap
instance Linear.Metric.Metric []
instance GHC.Classes.Ord k => Linear.Metric.Metric (Data.Map.Internal.Map k)
instance Linear.Metric.Metric GHC.Internal.Maybe.Maybe
instance (Linear.Metric.Metric f, Linear.Metric.Metric g) => Linear.Metric.Metric (Data.Functor.Product.Product f g)
instance Linear.Metric.Metric Data.Vector.Vector
instance Linear.Metric.Metric GHC.Internal.Functor.ZipList.ZipList

-- | n-D Vectors
module Linear.V
newtype V (n :: k) a
V :: Vector a -> V (n :: k) a
[toVector] :: V (n :: k) a -> Vector a

-- | This can be used to generate a template haskell splice for a type
--   level version of a given int.
--   
--   This does not use GHC TypeLits, instead it generates a numeric type by
--   hand similar to the ones used in the "Functional Pearl: Implicit
--   Configurations" paper by Oleg Kiselyov and Chung-Chieh Shan.
--   
--   instance Num (Q Exp) provided in this package allows writing
--   $(3) instead of $(int 3).
int :: Int -> TypeQ
dim :: forall {k} (n :: k) a. Dim n => V n a -> Int
class Dim (n :: k)
reflectDim :: Dim n => p n -> Int
reifyDim :: Int -> (forall n. Dim n => Proxy n -> r) -> r
reifyVector :: Vector a -> (forall n. Dim n => V n a -> r) -> r
reifyDimNat :: Int -> (forall (n :: Nat). KnownNat n => Proxy n -> r) -> r
reifyVectorNat :: Vector a -> (forall (n :: Nat). KnownNat n => V n a -> r) -> r
fromVector :: forall {k} (n :: k) a. Dim n => Vector a -> Maybe (V n a)
class Finite (v :: Type -> Type) where {
    type Size (v :: Type -> Type) :: Nat;
}
toV :: Finite v => v a -> V (Size v) a
($dmtoV) :: (Finite v, Foldable v) => v a -> V (Size v) a
fromV :: Finite v => V (Size v) a -> v a
_V :: forall (u :: Type -> Type) (v :: Type -> Type) a b. (Finite u, Finite v) => Iso (V (Size u) a) (V (Size v) b) (u a) (v b)
_V' :: forall (v :: Type -> Type) a b. Finite v => Iso (V (Size v) a) (V (Size v) b) (v a) (v b)
instance forall k (n :: k). Linear.V.Dim n => Linear.Vector.Additive (Linear.V.V n)
instance forall k (n :: k). Linear.V.Dim n => GHC.Internal.Base.Applicative (Linear.V.V n)
instance forall k (n :: k). Data.Functor.Bind.Class.Apply (Linear.V.V n)
instance forall k (n :: k) a. (Linear.V.Dim n, Data.Binary.Class.Binary a) => Data.Binary.Class.Binary (Linear.V.V n a)
instance forall k (n :: k). Data.Functor.Bind.Class.Bind (Linear.V.V n)
instance forall k a (n :: k). (GHC.Internal.Enum.Bounded a, Linear.V.Dim n) => GHC.Internal.Enum.Bounded (Linear.V.V n a)
instance forall k (n :: k) a. (GHC.Internal.Data.Typeable.Internal.Typeable (Linear.V.V n), GHC.Internal.Data.Typeable.Internal.Typeable (Linear.V.V n a), Linear.V.Dim n, GHC.Internal.Data.Data.Data a) => GHC.Internal.Data.Data.Data (Linear.V.V n a)
instance GHC.Internal.TypeNats.KnownNat n => Linear.V.Dim n
instance Data.Reflection.Reifies s GHC.Types.Int => Linear.V.Dim (Linear.V.ReifiedDim s)
instance forall k (n :: k) a. Linear.V.Dim n => Linear.V.Dim (Linear.V.V n a)
instance forall k (n :: k). Linear.V.Dim n => Data.Distributive.Distributive (Linear.V.V n)
instance forall k (n :: k) a b. Control.Lens.Each.Each (Linear.V.V n a) (Linear.V.V n b) a b
instance forall k (n :: k) a. (Linear.V.Dim n, Linear.Epsilon.Epsilon a) => Linear.Epsilon.Epsilon (Linear.V.V n a)
instance forall k (n :: k). Data.Functor.Classes.Eq1 (Linear.V.V n)
instance forall k (n :: k) a. GHC.Classes.Eq a => GHC.Classes.Eq (Linear.V.V n a)
instance (10 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field10 (Linear.V.V n a) (Linear.V.V n a) a a
instance (11 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field11 (Linear.V.V n a) (Linear.V.V n a) a a
instance (12 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field12 (Linear.V.V n a) (Linear.V.V n a) a a
instance (13 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field13 (Linear.V.V n a) (Linear.V.V n a) a a
instance (14 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field14 (Linear.V.V n a) (Linear.V.V n a) a a
instance (15 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field15 (Linear.V.V n a) (Linear.V.V n a) a a
instance (16 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field16 (Linear.V.V n a) (Linear.V.V n a) a a
instance (17 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field17 (Linear.V.V n a) (Linear.V.V n a) a a
instance (18 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field18 (Linear.V.V n a) (Linear.V.V n a) a a
instance (19 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field19 (Linear.V.V n a) (Linear.V.V n a) a a
instance (1 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field1 (Linear.V.V n a) (Linear.V.V n a) a a
instance (2 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field2 (Linear.V.V n a) (Linear.V.V n a) a a
instance (3 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field3 (Linear.V.V n a) (Linear.V.V n a) a a
instance (4 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field4 (Linear.V.V n a) (Linear.V.V n a) a a
instance (5 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field5 (Linear.V.V n a) (Linear.V.V n a) a a
instance (6 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field6 (Linear.V.V n a) (Linear.V.V n a) a a
instance (7 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field7 (Linear.V.V n a) (Linear.V.V n a) a a
instance (8 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field8 (Linear.V.V n a) (Linear.V.V n a) a a
instance (9 GHC.Internal.Data.Type.Ord.<= n) => Control.Lens.Tuple.Field9 (Linear.V.V n a) (Linear.V.V n a) a a
instance Linear.V.Finite Data.Complex.Complex
instance Linear.V.Finite (Linear.V.V n)
instance forall k (n :: k) a. (Linear.V.Dim n, GHC.Internal.Float.Floating a) => GHC.Internal.Float.Floating (Linear.V.V n a)
instance forall k (n :: k). GHC.Internal.Data.Foldable.Foldable (Linear.V.V n)
instance forall k (n :: k). WithIndex.FoldableWithIndex GHC.Types.Int (Linear.V.V n)
instance forall k (n :: k) a. (Linear.V.Dim n, GHC.Internal.Real.Fractional a) => GHC.Internal.Real.Fractional (Linear.V.V n a)
instance forall k (n :: k). GHC.Internal.Base.Functor (Linear.V.V n)
instance forall k (n :: k). WithIndex.FunctorWithIndex GHC.Types.Int (Linear.V.V n)
instance forall k (n :: k). GHC.Internal.Generics.Generic1 (Linear.V.V n)
instance forall k (n :: k) a. GHC.Internal.Generics.Generic (Linear.V.V n a)
instance forall k (n :: k). Linear.V.Dim n => Data.Hashable.Class.Hashable1 (Linear.V.V n)
instance forall k a (n :: k). Data.Hashable.Class.Hashable a => Data.Hashable.Class.Hashable (Linear.V.V n a)
instance forall k (n :: k) a. Control.Lens.At.Ixed (Linear.V.V n a)
instance forall k (n :: k) a. (Linear.V.Dim n, Data.Vector.Unboxed.Base.Unbox a) => Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector (Linear.V.V n a)
instance forall k (n :: k). Linear.V.Dim n => Linear.Metric.Metric (Linear.V.V n)
instance forall k (n :: k). Linear.V.Dim n => GHC.Internal.Control.Monad.Fix.MonadFix (Linear.V.V n)
instance forall k (n :: k). Linear.V.Dim n => GHC.Internal.Base.Monad (Linear.V.V n)
instance forall k (n :: k). Linear.V.Dim n => Control.Monad.Zip.MonadZip (Linear.V.V n)
instance forall k (n :: k) a. (Linear.V.Dim n, GHC.Internal.Base.Monoid a) => GHC.Internal.Base.Monoid (Linear.V.V n a)
instance forall k (n :: k) a. Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Linear.V.V n a)
instance forall k (n :: k) a. (Linear.V.Dim n, GHC.Internal.Num.Num a) => GHC.Internal.Num.Num (Linear.V.V n a)
instance forall k (n :: k). Data.Functor.Classes.Ord1 (Linear.V.V n)
instance forall k (n :: k) a. GHC.Classes.Ord a => GHC.Classes.Ord (Linear.V.V n a)
instance forall k (n :: k) a. (Linear.V.Dim n, System.Random.Random a) => System.Random.Random (Linear.V.V n a)
instance forall k (n :: k). Linear.V.Dim n => Data.Functor.Classes.Read1 (Linear.V.V n)
instance forall k (n :: k) a. GHC.Internal.Read.Read a => GHC.Internal.Read.Read (Linear.V.V n a)
instance forall k (n :: k). Linear.V.Dim n => Data.Functor.Rep.Representable (Linear.V.V n)
instance forall k (n :: k) a. (Linear.V.Dim n, GHC.Internal.Base.Semigroup a) => GHC.Internal.Base.Semigroup (Linear.V.V n a)
instance forall k (n :: k). Linear.V.Dim n => Data.Bytes.Serial.Serial1 (Linear.V.V n)
instance forall k (n :: k) a. (Linear.V.Dim n, Data.Bytes.Serial.Serial a) => Data.Bytes.Serial.Serial (Linear.V.V n a)
instance forall k (n :: k) a. (Linear.V.Dim n, Data.Serialize.Serialize a) => Data.Serialize.Serialize (Linear.V.V n a)
instance forall k (n :: k). Data.Functor.Classes.Show1 (Linear.V.V n)
instance forall k (n :: k) a. GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Linear.V.V n a)
instance forall k (n :: k) a. (Linear.V.Dim n, GHC.Internal.Foreign.Storable.Storable a) => GHC.Internal.Foreign.Storable.Storable (Linear.V.V n a)
instance forall k (n :: k). GHC.Internal.Data.Traversable.Traversable (Linear.V.V n)
instance forall k (n :: k). WithIndex.TraversableWithIndex GHC.Types.Int (Linear.V.V n)
instance forall k (n :: k) a. (Linear.V.Dim n, Data.Vector.Unboxed.Base.Unbox a) => Data.Vector.Unboxed.Base.Unbox (Linear.V.V n a)
instance forall k (n :: k) a. (Linear.V.Dim n, System.Random.Internal.UniformRange a) => System.Random.Internal.UniformRange (Linear.V.V n a)
instance forall k (n :: k) a. (Linear.V.Dim n, System.Random.Internal.Uniform a) => System.Random.Internal.Uniform (Linear.V.V n a)
instance forall k (n :: k) a. (Linear.V.Dim n, Data.Vector.Unboxed.Base.Unbox a) => Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector (Linear.V.V n a)

-- | 1-D Vectors
module Linear.V1

-- | A 1-dimensional vector
--   
--   
--   >>> pure 1 :: V1 Int
--   V1 1
--   
--   
--   
--   >>> V1 2 + V1 3
--   V1 5
--   
--   
--   
--   >>> V1 2 * V1 3
--   V1 6
--   
--   
--   
--   >>> sum (V1 2)
--   2
--   
newtype V1 a
V1 :: a -> V1 a

-- | A space that has at least 1 basis vector _x.
class R1 (t :: Type -> Type)

-- | 
--   >>> V1 2 ^._x
--   2
--   
--   
--   
--   >>> V1 2 & _x .~ 3
--   V1 3
--   
_x :: R1 t => Lens' (t a) a
ex :: forall (t :: Type -> Type). R1 t => E t
instance Linear.Vector.Additive Linear.V1.V1
instance GHC.Internal.Base.Applicative Linear.V1.V1
instance Data.Functor.Bind.Class.Apply Linear.V1.V1
instance Data.Binary.Class.Binary a => Data.Binary.Class.Binary (Linear.V1.V1 a)
instance Data.Functor.Bind.Class.Bind Linear.V1.V1
instance GHC.Internal.Enum.Bounded a => GHC.Internal.Enum.Bounded (Linear.V1.V1 a)
instance GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Linear.V1.V1 a)
instance Data.Distributive.Distributive Linear.V1.V1
instance Control.Lens.Each.Each (Linear.V1.V1 a) (Linear.V1.V1 b) a b
instance Linear.Epsilon.Epsilon a => Linear.Epsilon.Epsilon (Linear.V1.V1 a)
instance Data.Functor.Classes.Eq1 Linear.V1.V1
instance GHC.Classes.Eq a => GHC.Classes.Eq (Linear.V1.V1 a)
instance Control.Lens.Tuple.Field1 (Linear.V1.V1 a) (Linear.V1.V1 b) a b
instance Linear.V.Finite Linear.V1.V1
instance GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (Linear.V1.V1 a)
instance Data.Foldable1.Foldable1 Linear.V1.V1
instance GHC.Internal.Data.Foldable.Foldable Linear.V1.V1
instance WithIndex.FoldableWithIndex (Linear.Vector.E Linear.V1.V1) Linear.V1.V1
instance GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (Linear.V1.V1 a)
instance GHC.Internal.Base.Functor Linear.V1.V1
instance WithIndex.FunctorWithIndex (Linear.Vector.E Linear.V1.V1) Linear.V1.V1
instance GHC.Internal.Generics.Generic1 Linear.V1.V1
instance GHC.Internal.Generics.Generic (Linear.V1.V1 a)
instance Data.Hashable.Class.Hashable1 Linear.V1.V1
instance Data.Hashable.Class.Hashable a => Data.Hashable.Class.Hashable (Linear.V1.V1 a)
instance GHC.Internal.Ix.Ix a => GHC.Internal.Ix.Ix (Linear.V1.V1 a)
instance Control.Lens.At.Ixed (Linear.V1.V1 a)
instance Language.Haskell.TH.Syntax.Lift a => Language.Haskell.TH.Syntax.Lift (Linear.V1.V1 a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector (Linear.V1.V1 a)
instance Linear.Metric.Metric Linear.V1.V1
instance GHC.Internal.Control.Monad.Fix.MonadFix Linear.V1.V1
instance GHC.Internal.Base.Monad Linear.V1.V1
instance Control.Monad.Zip.MonadZip Linear.V1.V1
instance GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (Linear.V1.V1 a)
instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Linear.V1.V1 a)
instance GHC.Internal.Num.Num a => GHC.Internal.Num.Num (Linear.V1.V1 a)
instance Data.Functor.Classes.Ord1 Linear.V1.V1
instance GHC.Classes.Ord a => GHC.Classes.Ord (Linear.V1.V1 a)
instance Linear.V1.R1 GHC.Internal.Data.Functor.Identity.Identity
instance Linear.V1.R1 Linear.V1.V1
instance System.Random.Random a => System.Random.Random (Linear.V1.V1 a)
instance Data.Functor.Classes.Read1 Linear.V1.V1
instance GHC.Internal.Read.Read a => GHC.Internal.Read.Read (Linear.V1.V1 a)
instance Data.Functor.Rep.Representable Linear.V1.V1
instance GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (Linear.V1.V1 a)
instance Data.Bytes.Serial.Serial1 Linear.V1.V1
instance Data.Bytes.Serial.Serial a => Data.Bytes.Serial.Serial (Linear.V1.V1 a)
instance Data.Serialize.Serialize a => Data.Serialize.Serialize (Linear.V1.V1 a)
instance Data.Functor.Classes.Show1 Linear.V1.V1
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Linear.V1.V1 a)
instance GHC.Internal.Foreign.Storable.Storable a => GHC.Internal.Foreign.Storable.Storable (Linear.V1.V1 a)
instance Data.Semigroup.Traversable.Class.Traversable1 Linear.V1.V1
instance GHC.Internal.Data.Traversable.Traversable Linear.V1.V1
instance WithIndex.TraversableWithIndex (Linear.Vector.E Linear.V1.V1) Linear.V1.V1
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Unboxed.Base.Unbox (Linear.V1.V1 a)
instance System.Random.Internal.UniformRange a => System.Random.Internal.UniformRange (Linear.V1.V1 a)
instance System.Random.Internal.Uniform a => System.Random.Internal.Uniform (Linear.V1.V1 a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector (Linear.V1.V1 a)

-- | 2-D Vectors
module Linear.V2

-- | 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 -> V2 a

-- | A space that has at least 1 basis vector _x.
class R1 (t :: Type -> Type)

-- | 
--   >>> V1 2 ^._x
--   2
--   
--   
--   
--   >>> V1 2 & _x .~ 3
--   V1 3
--   
_x :: R1 t => Lens' (t a) a

-- | A space that distinguishes 2 orthogonal basis vectors _x and
--   _y, but may have more.
class R1 t => R2 (t :: Type -> Type)

-- | 
--   >>> V2 1 2 ^._y
--   2
--   
--   
--   
--   >>> V2 1 2 & _y .~ 3
--   V2 1 3
--   
_y :: R2 t => Lens' (t a) a
_xy :: R2 t => Lens' (t a) (V2 a)

-- | 
--   >>> V2 1 2 ^. _yx
--   V2 2 1
--   
_yx :: forall (t :: Type -> Type) a. R2 t => Lens' (t a) (V2 a)
ex :: forall (t :: Type -> Type). R1 t => E t
ey :: forall (t :: Type -> Type). R2 t => E t

-- | the counter-clockwise perpendicular vector
--   
--   
--   >>> perp $ V2 10 20
--   V2 (-20) 10
--   
perp :: Num a => V2 a -> V2 a
angle :: Floating a => a -> V2 a
unangle :: (Floating a, Ord a) => V2 a -> a

-- | The Z-component of the cross product of two vectors in the XY-plane.
--   
--   
--   >>> crossZ (V2 1 0) (V2 0 1)
--   1
--   
crossZ :: Num a => V2 a -> V2 a -> a
instance Linear.Vector.Additive Linear.V2.V2
instance GHC.Internal.Base.Applicative Linear.V2.V2
instance Data.Functor.Bind.Class.Apply Linear.V2.V2
instance Data.Binary.Class.Binary a => Data.Binary.Class.Binary (Linear.V2.V2 a)
instance Data.Functor.Bind.Class.Bind Linear.V2.V2
instance GHC.Internal.Enum.Bounded a => GHC.Internal.Enum.Bounded (Linear.V2.V2 a)
instance GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Linear.V2.V2 a)
instance Data.Distributive.Distributive Linear.V2.V2
instance Control.Lens.Each.Each (Linear.V2.V2 a) (Linear.V2.V2 b) a b
instance Linear.Epsilon.Epsilon a => Linear.Epsilon.Epsilon (Linear.V2.V2 a)
instance Data.Functor.Classes.Eq1 Linear.V2.V2
instance GHC.Classes.Eq a => GHC.Classes.Eq (Linear.V2.V2 a)
instance Control.Lens.Tuple.Field1 (Linear.V2.V2 a) (Linear.V2.V2 a) a a
instance Control.Lens.Tuple.Field2 (Linear.V2.V2 a) (Linear.V2.V2 a) a a
instance Linear.V.Finite Linear.V2.V2
instance GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (Linear.V2.V2 a)
instance Data.Foldable1.Foldable1 Linear.V2.V2
instance GHC.Internal.Data.Foldable.Foldable Linear.V2.V2
instance WithIndex.FoldableWithIndex (Linear.Vector.E Linear.V2.V2) Linear.V2.V2
instance GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (Linear.V2.V2 a)
instance GHC.Internal.Base.Functor Linear.V2.V2
instance WithIndex.FunctorWithIndex (Linear.Vector.E Linear.V2.V2) Linear.V2.V2
instance GHC.Internal.Generics.Generic1 Linear.V2.V2
instance GHC.Internal.Generics.Generic (Linear.V2.V2 a)
instance Data.Hashable.Class.Hashable1 Linear.V2.V2
instance Data.Hashable.Class.Hashable a => Data.Hashable.Class.Hashable (Linear.V2.V2 a)
instance GHC.Internal.Ix.Ix a => GHC.Internal.Ix.Ix (Linear.V2.V2 a)
instance Control.Lens.At.Ixed (Linear.V2.V2 a)
instance Language.Haskell.TH.Syntax.Lift a => Language.Haskell.TH.Syntax.Lift (Linear.V2.V2 a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector (Linear.V2.V2 a)
instance Linear.Metric.Metric Linear.V2.V2
instance GHC.Internal.Control.Monad.Fix.MonadFix Linear.V2.V2
instance GHC.Internal.Base.Monad Linear.V2.V2
instance Control.Monad.Zip.MonadZip Linear.V2.V2
instance GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (Linear.V2.V2 a)
instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Linear.V2.V2 a)
instance GHC.Internal.Num.Num a => GHC.Internal.Num.Num (Linear.V2.V2 a)
instance Data.Functor.Classes.Ord1 Linear.V2.V2
instance GHC.Classes.Ord a => GHC.Classes.Ord (Linear.V2.V2 a)
instance Linear.V1.R1 Linear.V2.V2
instance Linear.V2.R2 Linear.V2.V2
instance System.Random.Random a => System.Random.Random (Linear.V2.V2 a)
instance Data.Functor.Classes.Read1 Linear.V2.V2
instance GHC.Internal.Read.Read a => GHC.Internal.Read.Read (Linear.V2.V2 a)
instance Data.Functor.Rep.Representable Linear.V2.V2
instance GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (Linear.V2.V2 a)
instance Data.Bytes.Serial.Serial1 Linear.V2.V2
instance Data.Bytes.Serial.Serial a => Data.Bytes.Serial.Serial (Linear.V2.V2 a)
instance Data.Serialize.Serialize a => Data.Serialize.Serialize (Linear.V2.V2 a)
instance Data.Functor.Classes.Show1 Linear.V2.V2
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Linear.V2.V2 a)
instance GHC.Internal.Foreign.Storable.Storable a => GHC.Internal.Foreign.Storable.Storable (Linear.V2.V2 a)
instance Data.Semigroup.Traversable.Class.Traversable1 Linear.V2.V2
instance GHC.Internal.Data.Traversable.Traversable Linear.V2.V2
instance WithIndex.TraversableWithIndex (Linear.Vector.E Linear.V2.V2) Linear.V2.V2
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Unboxed.Base.Unbox (Linear.V2.V2 a)
instance System.Random.Internal.UniformRange a => System.Random.Internal.UniformRange (Linear.V2.V2 a)
instance System.Random.Internal.Uniform a => System.Random.Internal.Uniform (Linear.V2.V2 a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector (Linear.V2.V2 a)

-- | 3-D Vectors
module Linear.V3

-- | A 3-dimensional vector
data V3 a
V3 :: !a -> !a -> !a -> V3 a

-- | cross product
cross :: Num a => V3 a -> V3 a -> V3 a

-- | scalar triple product
triple :: Num a => V3 a -> V3 a -> V3 a -> a

-- | A space that has at least 1 basis vector _x.
class R1 (t :: Type -> Type)

-- | 
--   >>> V1 2 ^._x
--   2
--   
--   
--   
--   >>> V1 2 & _x .~ 3
--   V1 3
--   
_x :: R1 t => Lens' (t a) a

-- | A space that distinguishes 2 orthogonal basis vectors _x and
--   _y, but may have more.
class R1 t => R2 (t :: Type -> Type)

-- | 
--   >>> V2 1 2 ^._y
--   2
--   
--   
--   
--   >>> V2 1 2 & _y .~ 3
--   V2 1 3
--   
_y :: R2 t => Lens' (t a) a
_xy :: R2 t => Lens' (t a) (V2 a)

-- | 
--   >>> V2 1 2 ^. _yx
--   V2 2 1
--   
_yx :: forall (t :: Type -> Type) a. R2 t => Lens' (t a) (V2 a)

-- | A space that distinguishes 3 orthogonal basis vectors: _x,
--   _y, and _z. (It may have more)
class R2 t => R3 (t :: Type -> Type)

-- | 
--   >>> V3 1 2 3 ^. _z
--   3
--   
_z :: R3 t => Lens' (t a) a
_xyz :: R3 t => Lens' (t a) (V3 a)
_xz :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V2 a)
_yz :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V2 a)
_zx :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V2 a)
_zy :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V2 a)
_xzy :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V3 a)
_yxz :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V3 a)
_yzx :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V3 a)
_zxy :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V3 a)
_zyx :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V3 a)
ex :: forall (t :: Type -> Type). R1 t => E t
ey :: forall (t :: Type -> Type). R2 t => E t
ez :: forall (t :: Type -> Type). R3 t => E t
instance Linear.Vector.Additive Linear.V3.V3
instance GHC.Internal.Base.Applicative Linear.V3.V3
instance Data.Functor.Bind.Class.Apply Linear.V3.V3
instance Data.Binary.Class.Binary a => Data.Binary.Class.Binary (Linear.V3.V3 a)
instance Data.Functor.Bind.Class.Bind Linear.V3.V3
instance GHC.Internal.Enum.Bounded a => GHC.Internal.Enum.Bounded (Linear.V3.V3 a)
instance GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Linear.V3.V3 a)
instance Data.Distributive.Distributive Linear.V3.V3
instance Control.Lens.Each.Each (Linear.V3.V3 a) (Linear.V3.V3 b) a b
instance Linear.Epsilon.Epsilon a => Linear.Epsilon.Epsilon (Linear.V3.V3 a)
instance Data.Functor.Classes.Eq1 Linear.V3.V3
instance GHC.Classes.Eq a => GHC.Classes.Eq (Linear.V3.V3 a)
instance Control.Lens.Tuple.Field1 (Linear.V3.V3 a) (Linear.V3.V3 a) a a
instance Control.Lens.Tuple.Field2 (Linear.V3.V3 a) (Linear.V3.V3 a) a a
instance Control.Lens.Tuple.Field3 (Linear.V3.V3 a) (Linear.V3.V3 a) a a
instance Linear.V.Finite Linear.V3.V3
instance GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (Linear.V3.V3 a)
instance Data.Foldable1.Foldable1 Linear.V3.V3
instance GHC.Internal.Data.Foldable.Foldable Linear.V3.V3
instance WithIndex.FoldableWithIndex (Linear.Vector.E Linear.V3.V3) Linear.V3.V3
instance GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (Linear.V3.V3 a)
instance GHC.Internal.Base.Functor Linear.V3.V3
instance WithIndex.FunctorWithIndex (Linear.Vector.E Linear.V3.V3) Linear.V3.V3
instance GHC.Internal.Generics.Generic1 Linear.V3.V3
instance GHC.Internal.Generics.Generic (Linear.V3.V3 a)
instance Data.Hashable.Class.Hashable1 Linear.V3.V3
instance Data.Hashable.Class.Hashable a => Data.Hashable.Class.Hashable (Linear.V3.V3 a)
instance GHC.Internal.Ix.Ix a => GHC.Internal.Ix.Ix (Linear.V3.V3 a)
instance Control.Lens.At.Ixed (Linear.V3.V3 a)
instance Language.Haskell.TH.Syntax.Lift a => Language.Haskell.TH.Syntax.Lift (Linear.V3.V3 a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector (Linear.V3.V3 a)
instance Linear.Metric.Metric Linear.V3.V3
instance GHC.Internal.Control.Monad.Fix.MonadFix Linear.V3.V3
instance GHC.Internal.Base.Monad Linear.V3.V3
instance Control.Monad.Zip.MonadZip Linear.V3.V3
instance GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (Linear.V3.V3 a)
instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Linear.V3.V3 a)
instance GHC.Internal.Num.Num a => GHC.Internal.Num.Num (Linear.V3.V3 a)
instance Data.Functor.Classes.Ord1 Linear.V3.V3
instance GHC.Classes.Ord a => GHC.Classes.Ord (Linear.V3.V3 a)
instance Linear.V1.R1 Linear.V3.V3
instance Linear.V2.R2 Linear.V3.V3
instance Linear.V3.R3 Linear.V3.V3
instance System.Random.Random a => System.Random.Random (Linear.V3.V3 a)
instance Data.Functor.Classes.Read1 Linear.V3.V3
instance GHC.Internal.Read.Read a => GHC.Internal.Read.Read (Linear.V3.V3 a)
instance Data.Functor.Rep.Representable Linear.V3.V3
instance GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (Linear.V3.V3 a)
instance Data.Bytes.Serial.Serial1 Linear.V3.V3
instance Data.Bytes.Serial.Serial a => Data.Bytes.Serial.Serial (Linear.V3.V3 a)
instance Data.Serialize.Serialize a => Data.Serialize.Serialize (Linear.V3.V3 a)
instance Data.Functor.Classes.Show1 Linear.V3.V3
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Linear.V3.V3 a)
instance GHC.Internal.Foreign.Storable.Storable a => GHC.Internal.Foreign.Storable.Storable (Linear.V3.V3 a)
instance Data.Semigroup.Traversable.Class.Traversable1 Linear.V3.V3
instance GHC.Internal.Data.Traversable.Traversable Linear.V3.V3
instance WithIndex.TraversableWithIndex (Linear.Vector.E Linear.V3.V3) Linear.V3.V3
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Unboxed.Base.Unbox (Linear.V3.V3 a)
instance System.Random.Internal.UniformRange a => System.Random.Internal.UniformRange (Linear.V3.V3 a)
instance System.Random.Internal.Uniform a => System.Random.Internal.Uniform (Linear.V3.V3 a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector (Linear.V3.V3 a)

-- | 4-D Vectors
module Linear.V4

-- | A 4-dimensional vector.
data V4 a
V4 :: !a -> !a -> !a -> !a -> V4 a

-- | Convert a 3-dimensional affine vector into a 4-dimensional homogeneous
--   vector, i.e. sets the w coordinate to 0.
vector :: Num a => V3 a -> V4 a

-- | Convert a 3-dimensional affine point into a 4-dimensional homogeneous
--   vector, i.e. sets the w coordinate to 1.
point :: Num a => V3 a -> V4 a

-- | Convert 4-dimensional projective coordinates to a 3-dimensional point.
--   This operation may be denoted, euclidean [x:y:z:w] = (x/w, y/w,
--   z/w) where the projective, homogenous, coordinate
--   [x:y:z:w] is one of many associated with a single point
--   (x/w, y/w, z/w).
normalizePoint :: Fractional a => V4 a -> V3 a

-- | A space that has at least 1 basis vector _x.
class R1 (t :: Type -> Type)

-- | 
--   >>> V1 2 ^._x
--   2
--   
--   
--   
--   >>> V1 2 & _x .~ 3
--   V1 3
--   
_x :: R1 t => Lens' (t a) a

-- | A space that distinguishes 2 orthogonal basis vectors _x and
--   _y, but may have more.
class R1 t => R2 (t :: Type -> Type)

-- | 
--   >>> V2 1 2 ^._y
--   2
--   
--   
--   
--   >>> V2 1 2 & _y .~ 3
--   V2 1 3
--   
_y :: R2 t => Lens' (t a) a
_xy :: R2 t => Lens' (t a) (V2 a)

-- | 
--   >>> V2 1 2 ^. _yx
--   V2 2 1
--   
_yx :: forall (t :: Type -> Type) a. R2 t => Lens' (t a) (V2 a)

-- | A space that distinguishes 3 orthogonal basis vectors: _x,
--   _y, and _z. (It may have more)
class R2 t => R3 (t :: Type -> Type)

-- | 
--   >>> V3 1 2 3 ^. _z
--   3
--   
_z :: R3 t => Lens' (t a) a
_xyz :: R3 t => Lens' (t a) (V3 a)
_xz :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V2 a)
_yz :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V2 a)
_zx :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V2 a)
_zy :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V2 a)
_xzy :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V3 a)
_yxz :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V3 a)
_yzx :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V3 a)
_zxy :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V3 a)
_zyx :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V3 a)

-- | A space that distinguishes orthogonal basis vectors _x,
--   _y, _z, _w. (It may have more.)
class R3 t => R4 (t :: Type -> Type)

-- | 
--   >>> V4 1 2 3 4 ^._w
--   4
--   
_w :: R4 t => Lens' (t a) a
_xyzw :: R4 t => Lens' (t a) (V4 a)
_xw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V2 a)
_yw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V2 a)
_zw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V2 a)
_wx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V2 a)
_wy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V2 a)
_wz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V2 a)
_xyw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a)
_xzw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a)
_xwy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a)
_xwz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a)
_yxw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a)
_yzw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a)
_ywx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a)
_ywz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a)
_zxw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a)
_zyw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a)
_zwx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a)
_zwy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a)
_wxy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a)
_wxz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a)
_wyx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a)
_wyz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a)
_wzx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a)
_wzy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a)
_xywz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_xzyw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_xzwy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_xwyz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_xwzy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_yxzw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_yxwz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_yzxw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_yzwx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_ywxz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_ywzx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_zxyw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_zxwy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_zyxw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_zywx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_zwxy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_zwyx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_wxyz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_wxzy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_wyxz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_wyzx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_wzxy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
_wzyx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a)
ex :: forall (t :: Type -> Type). R1 t => E t
ey :: forall (t :: Type -> Type). R2 t => E t
ez :: forall (t :: Type -> Type). R3 t => E t
ew :: forall (t :: Type -> Type). R4 t => E t
instance Linear.Vector.Additive Linear.V4.V4
instance GHC.Internal.Base.Applicative Linear.V4.V4
instance Data.Functor.Bind.Class.Apply Linear.V4.V4
instance Data.Binary.Class.Binary a => Data.Binary.Class.Binary (Linear.V4.V4 a)
instance Data.Functor.Bind.Class.Bind Linear.V4.V4
instance GHC.Internal.Enum.Bounded a => GHC.Internal.Enum.Bounded (Linear.V4.V4 a)
instance GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Linear.V4.V4 a)
instance Data.Distributive.Distributive Linear.V4.V4
instance Control.Lens.Each.Each (Linear.V4.V4 a) (Linear.V4.V4 b) a b
instance Linear.Epsilon.Epsilon a => Linear.Epsilon.Epsilon (Linear.V4.V4 a)
instance Data.Functor.Classes.Eq1 Linear.V4.V4
instance GHC.Classes.Eq a => GHC.Classes.Eq (Linear.V4.V4 a)
instance Control.Lens.Tuple.Field1 (Linear.V4.V4 a) (Linear.V4.V4 a) a a
instance Control.Lens.Tuple.Field2 (Linear.V4.V4 a) (Linear.V4.V4 a) a a
instance Control.Lens.Tuple.Field3 (Linear.V4.V4 a) (Linear.V4.V4 a) a a
instance Control.Lens.Tuple.Field4 (Linear.V4.V4 a) (Linear.V4.V4 a) a a
instance Linear.V.Finite Linear.V4.V4
instance GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (Linear.V4.V4 a)
instance Data.Foldable1.Foldable1 Linear.V4.V4
instance GHC.Internal.Data.Foldable.Foldable Linear.V4.V4
instance WithIndex.FoldableWithIndex (Linear.Vector.E Linear.V4.V4) Linear.V4.V4
instance GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (Linear.V4.V4 a)
instance GHC.Internal.Base.Functor Linear.V4.V4
instance WithIndex.FunctorWithIndex (Linear.Vector.E Linear.V4.V4) Linear.V4.V4
instance GHC.Internal.Generics.Generic1 Linear.V4.V4
instance GHC.Internal.Generics.Generic (Linear.V4.V4 a)
instance Data.Hashable.Class.Hashable1 Linear.V4.V4
instance Data.Hashable.Class.Hashable a => Data.Hashable.Class.Hashable (Linear.V4.V4 a)
instance GHC.Internal.Ix.Ix a => GHC.Internal.Ix.Ix (Linear.V4.V4 a)
instance Control.Lens.At.Ixed (Linear.V4.V4 a)
instance Language.Haskell.TH.Syntax.Lift a => Language.Haskell.TH.Syntax.Lift (Linear.V4.V4 a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector (Linear.V4.V4 a)
instance Linear.Metric.Metric Linear.V4.V4
instance GHC.Internal.Control.Monad.Fix.MonadFix Linear.V4.V4
instance GHC.Internal.Base.Monad Linear.V4.V4
instance Control.Monad.Zip.MonadZip Linear.V4.V4
instance GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (Linear.V4.V4 a)
instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Linear.V4.V4 a)
instance GHC.Internal.Num.Num a => GHC.Internal.Num.Num (Linear.V4.V4 a)
instance Data.Functor.Classes.Ord1 Linear.V4.V4
instance GHC.Classes.Ord a => GHC.Classes.Ord (Linear.V4.V4 a)
instance Linear.V1.R1 Linear.V4.V4
instance Linear.V2.R2 Linear.V4.V4
instance Linear.V3.R3 Linear.V4.V4
instance Linear.V4.R4 Linear.V4.V4
instance System.Random.Random a => System.Random.Random (Linear.V4.V4 a)
instance Data.Functor.Classes.Read1 Linear.V4.V4
instance GHC.Internal.Read.Read a => GHC.Internal.Read.Read (Linear.V4.V4 a)
instance Data.Functor.Rep.Representable Linear.V4.V4
instance GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (Linear.V4.V4 a)
instance Data.Bytes.Serial.Serial1 Linear.V4.V4
instance Data.Bytes.Serial.Serial a => Data.Bytes.Serial.Serial (Linear.V4.V4 a)
instance Data.Serialize.Serialize a => Data.Serialize.Serialize (Linear.V4.V4 a)
instance Data.Functor.Classes.Show1 Linear.V4.V4
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Linear.V4.V4 a)
instance GHC.Internal.Foreign.Storable.Storable a => GHC.Internal.Foreign.Storable.Storable (Linear.V4.V4 a)
instance Data.Semigroup.Traversable.Class.Traversable1 Linear.V4.V4
instance GHC.Internal.Data.Traversable.Traversable Linear.V4.V4
instance WithIndex.TraversableWithIndex (Linear.Vector.E Linear.V4.V4) Linear.V4.V4
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Unboxed.Base.Unbox (Linear.V4.V4 a)
instance System.Random.Internal.UniformRange a => System.Random.Internal.UniformRange (Linear.V4.V4 a)
instance System.Random.Internal.Uniform a => System.Random.Internal.Uniform (Linear.V4.V4 a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector (Linear.V4.V4 a)

-- | 0-D Vectors
module Linear.V0

-- | A 0-dimensional vector
--   
--   
--   >>> pure 1 :: V0 Int
--   V0
--   
--   
--   
--   >>> V0 + V0
--   V0
--   
data V0 a
V0 :: V0 a
instance Linear.Vector.Additive Linear.V0.V0
instance GHC.Internal.Base.Applicative Linear.V0.V0
instance Data.Functor.Bind.Class.Apply Linear.V0.V0
instance Data.Binary.Class.Binary (Linear.V0.V0 a)
instance Data.Functor.Bind.Class.Bind Linear.V0.V0
instance GHC.Internal.Enum.Bounded (Linear.V0.V0 a)
instance GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Linear.V0.V0 a)
instance Data.Distributive.Distributive Linear.V0.V0
instance Control.Lens.Each.Each (Linear.V0.V0 a) (Linear.V0.V0 b) a b
instance GHC.Internal.Enum.Enum (Linear.V0.V0 a)
instance Linear.Epsilon.Epsilon (Linear.V0.V0 a)
instance Data.Functor.Classes.Eq1 Linear.V0.V0
instance GHC.Classes.Eq (Linear.V0.V0 a)
instance Linear.V.Finite Linear.V0.V0
instance GHC.Internal.Float.Floating (Linear.V0.V0 a)
instance GHC.Internal.Data.Foldable.Foldable Linear.V0.V0
instance WithIndex.FoldableWithIndex (Linear.Vector.E Linear.V0.V0) Linear.V0.V0
instance GHC.Internal.Real.Fractional (Linear.V0.V0 a)
instance GHC.Internal.Base.Functor Linear.V0.V0
instance WithIndex.FunctorWithIndex (Linear.Vector.E Linear.V0.V0) Linear.V0.V0
instance GHC.Internal.Generics.Generic1 Linear.V0.V0
instance GHC.Internal.Generics.Generic (Linear.V0.V0 a)
instance Data.Hashable.Class.Hashable1 Linear.V0.V0
instance Data.Hashable.Class.Hashable (Linear.V0.V0 a)
instance GHC.Internal.Ix.Ix (Linear.V0.V0 a)
instance Control.Lens.At.Ixed (Linear.V0.V0 a)
instance Language.Haskell.TH.Syntax.Lift (Linear.V0.V0 a)
instance Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector (Linear.V0.V0 a)
instance Linear.Metric.Metric Linear.V0.V0
instance GHC.Internal.Control.Monad.Fix.MonadFix Linear.V0.V0
instance GHC.Internal.Base.Monad Linear.V0.V0
instance Control.Monad.Zip.MonadZip Linear.V0.V0
instance GHC.Internal.Base.Monoid (Linear.V0.V0 a)
instance Control.DeepSeq.NFData (Linear.V0.V0 a)
instance GHC.Internal.Num.Num (Linear.V0.V0 a)
instance Data.Functor.Classes.Ord1 Linear.V0.V0
instance GHC.Classes.Ord (Linear.V0.V0 a)
instance System.Random.Random (Linear.V0.V0 a)
instance Data.Functor.Classes.Read1 Linear.V0.V0
instance GHC.Internal.Read.Read (Linear.V0.V0 a)
instance Data.Functor.Rep.Representable Linear.V0.V0
instance GHC.Internal.Base.Semigroup (Linear.V0.V0 a)
instance Data.Bytes.Serial.Serial1 Linear.V0.V0
instance Data.Bytes.Serial.Serial (Linear.V0.V0 a)
instance Data.Serialize.Serialize (Linear.V0.V0 a)
instance Data.Functor.Classes.Show1 Linear.V0.V0
instance GHC.Internal.Show.Show (Linear.V0.V0 a)
instance GHC.Internal.Foreign.Storable.Storable (Linear.V0.V0 a)
instance GHC.Internal.Data.Traversable.Traversable Linear.V0.V0
instance WithIndex.TraversableWithIndex (Linear.Vector.E Linear.V0.V0) Linear.V0.V0
instance Data.Vector.Unboxed.Base.Unbox (Linear.V0.V0 a)
instance System.Random.Internal.UniformRange (Linear.V0.V0 a)
instance System.Random.Internal.Uniform (Linear.V0.V0 a)
instance Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector (Linear.V0.V0 a)

-- | Quaternions
module Linear.Quaternion

-- | Quaternions
data Quaternion a
Quaternion :: !a -> {-# UNPACK #-} !V3 a -> Quaternion a

-- | A vector space that includes the basis elements _e and
--   _i
class Complicated (t :: Type -> Type)
_e :: Complicated t => Lens' (t a) a
_i :: Complicated t => Lens' (t a) a

-- | A vector space that includes the basis elements _e, _i,
--   _j and _k
class Complicated t => Hamiltonian (t :: Type -> Type)
_j :: Hamiltonian t => Lens' (t a) a
_k :: Hamiltonian t => Lens' (t a) a
_ijk :: Hamiltonian t => Lens' (t a) (V3 a)
ee :: forall (t :: Type -> Type). Complicated t => E t
ei :: forall (t :: Type -> Type). Complicated t => E t
ej :: forall (t :: Type -> Type). Hamiltonian t => E t
ek :: forall (t :: Type -> Type). Hamiltonian t => E t

-- | Spherical linear interpolation between two quaternions.
slerp :: RealFloat a => Quaternion a -> Quaternion a -> a -> Quaternion a

-- | asin with a specified branch cut.
asinq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a

-- | acos with a specified branch cut.
acosq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a

-- | atan with a specified branch cut.
atanq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a

-- | asinh with a specified branch cut.
asinhq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a

-- | acosh with a specified branch cut.
acoshq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a

-- | atanh with a specified branch cut.
atanhq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a

-- | norm of the imaginary component
absi :: Floating a => Quaternion a -> a

-- | raise a Quaternion to a scalar power
pow :: RealFloat a => Quaternion a -> a -> Quaternion a

-- | Apply a rotation to a vector.
rotate :: (Conjugate a, RealFloat a) => Quaternion a -> V3 a -> V3 a

-- | axisAngle axis theta builds a Quaternion
--   representing a rotation of theta radians about axis.
axisAngle :: (Epsilon a, Floating a) => V3 a -> a -> Quaternion a
instance Linear.Vector.Additive Linear.Quaternion.Quaternion
instance GHC.Internal.Base.Applicative Linear.Quaternion.Quaternion
instance Data.Functor.Bind.Class.Apply Linear.Quaternion.Quaternion
instance Data.Binary.Class.Binary a => Data.Binary.Class.Binary (Linear.Quaternion.Quaternion a)
instance Data.Functor.Bind.Class.Bind Linear.Quaternion.Quaternion
instance Linear.Quaternion.Complicated Data.Complex.Complex
instance Linear.Quaternion.Complicated Linear.Quaternion.Quaternion
instance (Linear.Conjugate.Conjugate a, GHC.Internal.Float.RealFloat a) => Linear.Conjugate.Conjugate (Linear.Quaternion.Quaternion a)
instance GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Linear.Quaternion.Quaternion a)
instance Data.Distributive.Distributive Linear.Quaternion.Quaternion
instance Control.Lens.Each.Each (Linear.Quaternion.Quaternion a) (Linear.Quaternion.Quaternion b) a b
instance (GHC.Internal.Float.RealFloat a, Linear.Epsilon.Epsilon a) => Linear.Epsilon.Epsilon (Linear.Quaternion.Quaternion a)
instance Data.Functor.Classes.Eq1 Linear.Quaternion.Quaternion
instance GHC.Classes.Eq a => GHC.Classes.Eq (Linear.Quaternion.Quaternion a)
instance Control.Lens.Tuple.Field1 (Linear.Quaternion.Quaternion a) (Linear.Quaternion.Quaternion a) a a
instance Control.Lens.Tuple.Field2 (Linear.Quaternion.Quaternion a) (Linear.Quaternion.Quaternion a) a a
instance Control.Lens.Tuple.Field3 (Linear.Quaternion.Quaternion a) (Linear.Quaternion.Quaternion a) a a
instance Control.Lens.Tuple.Field4 (Linear.Quaternion.Quaternion a) (Linear.Quaternion.Quaternion a) a a
instance Linear.V.Finite Linear.Quaternion.Quaternion
instance GHC.Internal.Float.RealFloat a => GHC.Internal.Float.Floating (Linear.Quaternion.Quaternion a)
instance GHC.Internal.Data.Foldable.Foldable Linear.Quaternion.Quaternion
instance WithIndex.FoldableWithIndex (Linear.Vector.E Linear.Quaternion.Quaternion) Linear.Quaternion.Quaternion
instance GHC.Internal.Float.RealFloat a => GHC.Internal.Real.Fractional (Linear.Quaternion.Quaternion a)
instance GHC.Internal.Base.Functor Linear.Quaternion.Quaternion
instance WithIndex.FunctorWithIndex (Linear.Vector.E Linear.Quaternion.Quaternion) Linear.Quaternion.Quaternion
instance GHC.Internal.Generics.Generic1 Linear.Quaternion.Quaternion
instance GHC.Internal.Generics.Generic (Linear.Quaternion.Quaternion a)
instance Linear.Quaternion.Hamiltonian Linear.Quaternion.Quaternion
instance Data.Hashable.Class.Hashable1 Linear.Quaternion.Quaternion
instance Data.Hashable.Class.Hashable a => Data.Hashable.Class.Hashable (Linear.Quaternion.Quaternion a)
instance GHC.Internal.Ix.Ix a => GHC.Internal.Ix.Ix (Linear.Quaternion.Quaternion a)
instance Control.Lens.At.Ixed (Linear.Quaternion.Quaternion a)
instance Language.Haskell.TH.Syntax.Lift a => Language.Haskell.TH.Syntax.Lift (Linear.Quaternion.Quaternion a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector (Linear.Quaternion.Quaternion a)
instance Linear.Metric.Metric Linear.Quaternion.Quaternion
instance GHC.Internal.Control.Monad.Fix.MonadFix Linear.Quaternion.Quaternion
instance GHC.Internal.Base.Monad Linear.Quaternion.Quaternion
instance Control.Monad.Zip.MonadZip Linear.Quaternion.Quaternion
instance GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (Linear.Quaternion.Quaternion a)
instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Linear.Quaternion.Quaternion a)
instance GHC.Internal.Float.RealFloat a => GHC.Internal.Num.Num (Linear.Quaternion.Quaternion a)
instance Data.Functor.Classes.Ord1 Linear.Quaternion.Quaternion
instance GHC.Classes.Ord a => GHC.Classes.Ord (Linear.Quaternion.Quaternion a)
instance Linear.V1.R1 Linear.Quaternion.Quaternion
instance Linear.V2.R2 Linear.Quaternion.Quaternion
instance Linear.V3.R3 Linear.Quaternion.Quaternion
instance Linear.V4.R4 Linear.Quaternion.Quaternion
instance System.Random.Random a => System.Random.Random (Linear.Quaternion.Quaternion a)
instance Data.Functor.Classes.Read1 Linear.Quaternion.Quaternion
instance GHC.Internal.Read.Read a => GHC.Internal.Read.Read (Linear.Quaternion.Quaternion a)
instance Data.Functor.Rep.Representable Linear.Quaternion.Quaternion
instance GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (Linear.Quaternion.Quaternion a)
instance Data.Bytes.Serial.Serial1 Linear.Quaternion.Quaternion
instance Data.Bytes.Serial.Serial a => Data.Bytes.Serial.Serial (Linear.Quaternion.Quaternion a)
instance Data.Serialize.Serialize a => Data.Serialize.Serialize (Linear.Quaternion.Quaternion a)
instance Data.Functor.Classes.Show1 Linear.Quaternion.Quaternion
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Linear.Quaternion.Quaternion a)
instance GHC.Internal.Foreign.Storable.Storable a => GHC.Internal.Foreign.Storable.Storable (Linear.Quaternion.Quaternion a)
instance GHC.Internal.Data.Traversable.Traversable Linear.Quaternion.Quaternion
instance WithIndex.TraversableWithIndex (Linear.Vector.E Linear.Quaternion.Quaternion) Linear.Quaternion.Quaternion
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Unboxed.Base.Unbox (Linear.Quaternion.Quaternion a)
instance System.Random.Internal.Uniform a => System.Random.Internal.Uniform (Linear.Quaternion.Quaternion a)
instance System.Random.Internal.UniformRange a => System.Random.Internal.UniformRange (Linear.Quaternion.Quaternion a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector (Linear.Quaternion.Quaternion a)

-- | Plücker coordinates for lines in 3d homogeneous space.
module Linear.Plucker

-- | Plücker coordinates for lines in a 3-dimensional space.
data Plucker a
Plucker :: !a -> !a -> !a -> !a -> !a -> !a -> Plucker a

-- | Valid Plücker coordinates p will have squaredError
--   p == 0
--   
--   That said, floating point makes a mockery of this claim, so you may
--   want to use nearZero.
squaredError :: Num a => Plucker a -> a

-- | Checks if the line is near-isotropic (isotropic vectors in this
--   quadratic space represent lines in real 3d space).
isotropic :: Epsilon a => Plucker a -> Bool

-- | This isn't th actual metric because this bilinear form gives rise to
--   an isotropic quadratic space
(><) :: Num a => Plucker a -> Plucker a -> a
infixl 5 ><

-- | Given a pair of points represented by homogeneous coordinates generate
--   Plücker coordinates for the line through them, directed from the
--   second towards the first.
plucker :: Num a => V4 a -> V4 a -> Plucker a

-- | Given a pair of 3D points, generate Plücker coordinates for the line
--   through them, directed from the second towards the first.
plucker3D :: Num a => V3 a -> V3 a -> Plucker a

-- | Checks if two lines are parallel.
parallel :: Epsilon a => Plucker a -> Plucker a -> Bool

-- | Checks if two lines intersect (or nearly intersect).
intersects :: (Epsilon a, Ord a) => Plucker a -> Plucker a -> Bool

-- | Describe how two lines pass each other.
data LinePass

-- | The lines are coplanar (parallel or intersecting).
Coplanar :: LinePass

-- | The lines pass each other clockwise (right-handed screw)
Clockwise :: LinePass

-- | The lines pass each other counterclockwise (left-handed screw).
Counterclockwise :: LinePass

-- | Check how two lines pass each other. passes l1 l2 describes
--   l2 when looking down l1.
passes :: (Epsilon a, Ord a) => Plucker a -> Plucker a -> LinePass

-- | The minimum squared distance of a line from the origin.
quadranceToOrigin :: Fractional a => Plucker a -> a

-- | The point where a line is closest to the origin.
closestToOrigin :: Fractional a => Plucker a -> V3 a

-- | Not all 6-dimensional points correspond to a line in 3D. This
--   predicate tests that a Plücker coordinate lies on the Grassmann
--   manifold, and does indeed represent a 3D line.
isLine :: Epsilon a => Plucker a -> Bool

-- | Checks if two lines coincide in space. In other words, undirected
--   equality.
coincides :: (Epsilon a, Fractional a) => Plucker a -> Plucker a -> Bool

-- | Checks if two lines coincide in space, and have the same orientation.
coincides' :: (Epsilon a, Fractional a, Ord a) => Plucker a -> Plucker a -> Bool

-- | These elements form a basis for the Plücker space, or the Grassmanian
--   manifold Gr(2,V4).
--   
--   
--   p01 :: Lens' (Plucker a) a
--   p02 :: Lens' (Plucker a) a
--   p03 :: Lens' (Plucker a) a
--   p23 :: Lens' (Plucker a) a
--   p31 :: Lens' (Plucker a) a
--   p12 :: Lens' (Plucker a) a
--   
p01 :: forall a f. Functor f => (a -> f a) -> Plucker a -> f (Plucker a)

-- | These elements form a basis for the Plücker space, or the Grassmanian
--   manifold Gr(2,V4).
--   
--   
--   p01 :: Lens' (Plucker a) a
--   p02 :: Lens' (Plucker a) a
--   p03 :: Lens' (Plucker a) a
--   p23 :: Lens' (Plucker a) a
--   p31 :: Lens' (Plucker a) a
--   p12 :: Lens' (Plucker a) a
--   
p02 :: forall a f. Functor f => (a -> f a) -> Plucker a -> f (Plucker a)

-- | These elements form a basis for the Plücker space, or the Grassmanian
--   manifold Gr(2,V4).
--   
--   
--   p01 :: Lens' (Plucker a) a
--   p02 :: Lens' (Plucker a) a
--   p03 :: Lens' (Plucker a) a
--   p23 :: Lens' (Plucker a) a
--   p31 :: Lens' (Plucker a) a
--   p12 :: Lens' (Plucker a) a
--   
p03 :: forall a f. Functor f => (a -> f a) -> Plucker a -> f (Plucker a)

-- | These elements form an alternate basis for the Plücker space, or the
--   Grassmanian manifold Gr(2,V4).
--   
--   
--   p10 :: Num a => Lens' (Plucker a) a
--   p20 :: Num a => Lens' (Plucker a) a
--   p30 :: Num a => Lens' (Plucker a) a
--   p32 :: Num a => Lens' (Plucker a) a
--   p13 :: Num a => Lens' (Plucker a) a
--   p21 :: Num a => Lens' (Plucker a) a
--   
p10 :: (Functor f, Num a) => (a -> f a) -> Plucker a -> f (Plucker a)

-- | These elements form a basis for the Plücker space, or the Grassmanian
--   manifold Gr(2,V4).
--   
--   
--   p01 :: Lens' (Plucker a) a
--   p02 :: Lens' (Plucker a) a
--   p03 :: Lens' (Plucker a) a
--   p23 :: Lens' (Plucker a) a
--   p31 :: Lens' (Plucker a) a
--   p12 :: Lens' (Plucker a) a
--   
p12 :: forall a f. Functor f => (a -> f a) -> Plucker a -> f (Plucker a)

-- | These elements form an alternate basis for the Plücker space, or the
--   Grassmanian manifold Gr(2,V4).
--   
--   
--   p10 :: Num a => Lens' (Plucker a) a
--   p20 :: Num a => Lens' (Plucker a) a
--   p30 :: Num a => Lens' (Plucker a) a
--   p32 :: Num a => Lens' (Plucker a) a
--   p13 :: Num a => Lens' (Plucker a) a
--   p21 :: Num a => Lens' (Plucker a) a
--   
p13 :: (Functor f, Num a) => (a -> f a) -> Plucker a -> f (Plucker a)

-- | These elements form an alternate basis for the Plücker space, or the
--   Grassmanian manifold Gr(2,V4).
--   
--   
--   p10 :: Num a => Lens' (Plucker a) a
--   p20 :: Num a => Lens' (Plucker a) a
--   p30 :: Num a => Lens' (Plucker a) a
--   p32 :: Num a => Lens' (Plucker a) a
--   p13 :: Num a => Lens' (Plucker a) a
--   p21 :: Num a => Lens' (Plucker a) a
--   
p20 :: (Functor f, Num a) => (a -> f a) -> Plucker a -> f (Plucker a)

-- | These elements form an alternate basis for the Plücker space, or the
--   Grassmanian manifold Gr(2,V4).
--   
--   
--   p10 :: Num a => Lens' (Plucker a) a
--   p20 :: Num a => Lens' (Plucker a) a
--   p30 :: Num a => Lens' (Plucker a) a
--   p32 :: Num a => Lens' (Plucker a) a
--   p13 :: Num a => Lens' (Plucker a) a
--   p21 :: Num a => Lens' (Plucker a) a
--   
p21 :: (Functor f, Num a) => (a -> f a) -> Plucker a -> f (Plucker a)

-- | These elements form a basis for the Plücker space, or the Grassmanian
--   manifold Gr(2,V4).
--   
--   
--   p01 :: Lens' (Plucker a) a
--   p02 :: Lens' (Plucker a) a
--   p03 :: Lens' (Plucker a) a
--   p23 :: Lens' (Plucker a) a
--   p31 :: Lens' (Plucker a) a
--   p12 :: Lens' (Plucker a) a
--   
p23 :: forall a f. Functor f => (a -> f a) -> Plucker a -> f (Plucker a)

-- | These elements form an alternate basis for the Plücker space, or the
--   Grassmanian manifold Gr(2,V4).
--   
--   
--   p10 :: Num a => Lens' (Plucker a) a
--   p20 :: Num a => Lens' (Plucker a) a
--   p30 :: Num a => Lens' (Plucker a) a
--   p32 :: Num a => Lens' (Plucker a) a
--   p13 :: Num a => Lens' (Plucker a) a
--   p21 :: Num a => Lens' (Plucker a) a
--   
p30 :: (Functor f, Num a) => (a -> f a) -> Plucker a -> f (Plucker a)

-- | These elements form a basis for the Plücker space, or the Grassmanian
--   manifold Gr(2,V4).
--   
--   
--   p01 :: Lens' (Plucker a) a
--   p02 :: Lens' (Plucker a) a
--   p03 :: Lens' (Plucker a) a
--   p23 :: Lens' (Plucker a) a
--   p31 :: Lens' (Plucker a) a
--   p12 :: Lens' (Plucker a) a
--   
p31 :: forall a f. Functor f => (a -> f a) -> Plucker a -> f (Plucker a)

-- | These elements form an alternate basis for the Plücker space, or the
--   Grassmanian manifold Gr(2,V4).
--   
--   
--   p10 :: Num a => Lens' (Plucker a) a
--   p20 :: Num a => Lens' (Plucker a) a
--   p30 :: Num a => Lens' (Plucker a) a
--   p32 :: Num a => Lens' (Plucker a) a
--   p13 :: Num a => Lens' (Plucker a) a
--   p21 :: Num a => Lens' (Plucker a) a
--   
p32 :: (Functor f, Num a) => (a -> f a) -> Plucker a -> f (Plucker a)
e01 :: E Plucker
e02 :: E Plucker
e03 :: E Plucker
e12 :: E Plucker
e31 :: E Plucker
e23 :: E Plucker
instance Linear.Vector.Additive Linear.Plucker.Plucker
instance GHC.Internal.Base.Applicative Linear.Plucker.Plucker
instance Data.Functor.Bind.Class.Apply Linear.Plucker.Plucker
instance Data.Binary.Class.Binary a => Data.Binary.Class.Binary (Linear.Plucker.Plucker a)
instance Data.Functor.Bind.Class.Bind Linear.Plucker.Plucker
instance Data.Distributive.Distributive Linear.Plucker.Plucker
instance Control.Lens.Each.Each (Linear.Plucker.Plucker a) (Linear.Plucker.Plucker b) a b
instance Linear.Epsilon.Epsilon a => Linear.Epsilon.Epsilon (Linear.Plucker.Plucker a)
instance Data.Functor.Classes.Eq1 Linear.Plucker.Plucker
instance GHC.Classes.Eq Linear.Plucker.LinePass
instance GHC.Classes.Eq a => GHC.Classes.Eq (Linear.Plucker.Plucker a)
instance Control.Lens.Tuple.Field1 (Linear.Plucker.Plucker a) (Linear.Plucker.Plucker a) a a
instance Control.Lens.Tuple.Field2 (Linear.Plucker.Plucker a) (Linear.Plucker.Plucker a) a a
instance Control.Lens.Tuple.Field3 (Linear.Plucker.Plucker a) (Linear.Plucker.Plucker a) a a
instance Control.Lens.Tuple.Field4 (Linear.Plucker.Plucker a) (Linear.Plucker.Plucker a) a a
instance Control.Lens.Tuple.Field5 (Linear.Plucker.Plucker a) (Linear.Plucker.Plucker a) a a
instance Control.Lens.Tuple.Field6 (Linear.Plucker.Plucker a) (Linear.Plucker.Plucker a) a a
instance Linear.V.Finite Linear.Plucker.Plucker
instance GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (Linear.Plucker.Plucker a)
instance Data.Foldable1.Foldable1 Linear.Plucker.Plucker
instance GHC.Internal.Data.Foldable.Foldable Linear.Plucker.Plucker
instance WithIndex.FoldableWithIndex (Linear.Vector.E Linear.Plucker.Plucker) Linear.Plucker.Plucker
instance GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (Linear.Plucker.Plucker a)
instance GHC.Internal.Base.Functor Linear.Plucker.Plucker
instance WithIndex.FunctorWithIndex (Linear.Vector.E Linear.Plucker.Plucker) Linear.Plucker.Plucker
instance GHC.Internal.Generics.Generic1 Linear.Plucker.Plucker
instance GHC.Internal.Generics.Generic Linear.Plucker.LinePass
instance GHC.Internal.Generics.Generic (Linear.Plucker.Plucker a)
instance Data.Hashable.Class.Hashable a => Data.Hashable.Class.Hashable (Linear.Plucker.Plucker a)
instance GHC.Internal.Ix.Ix a => GHC.Internal.Ix.Ix (Linear.Plucker.Plucker a)
instance Control.Lens.At.Ixed (Linear.Plucker.Plucker a)
instance Language.Haskell.TH.Syntax.Lift a => Language.Haskell.TH.Syntax.Lift (Linear.Plucker.Plucker a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector (Linear.Plucker.Plucker a)
instance Linear.Metric.Metric Linear.Plucker.Plucker
instance GHC.Internal.Control.Monad.Fix.MonadFix Linear.Plucker.Plucker
instance GHC.Internal.Base.Monad Linear.Plucker.Plucker
instance Control.Monad.Zip.MonadZip Linear.Plucker.Plucker
instance GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (Linear.Plucker.Plucker a)
instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Linear.Plucker.Plucker a)
instance GHC.Internal.Num.Num a => GHC.Internal.Num.Num (Linear.Plucker.Plucker a)
instance Data.Functor.Classes.Ord1 Linear.Plucker.Plucker
instance GHC.Classes.Ord a => GHC.Classes.Ord (Linear.Plucker.Plucker a)
instance System.Random.Random a => System.Random.Random (Linear.Plucker.Plucker a)
instance Data.Functor.Classes.Read1 Linear.Plucker.Plucker
instance GHC.Internal.Read.Read a => GHC.Internal.Read.Read (Linear.Plucker.Plucker a)
instance Data.Functor.Rep.Representable Linear.Plucker.Plucker
instance GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (Linear.Plucker.Plucker a)
instance Data.Bytes.Serial.Serial1 Linear.Plucker.Plucker
instance Data.Bytes.Serial.Serial a => Data.Bytes.Serial.Serial (Linear.Plucker.Plucker a)
instance Data.Serialize.Serialize a => Data.Serialize.Serialize (Linear.Plucker.Plucker a)
instance Data.Functor.Classes.Show1 Linear.Plucker.Plucker
instance GHC.Internal.Show.Show Linear.Plucker.LinePass
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Linear.Plucker.Plucker a)
instance GHC.Internal.Foreign.Storable.Storable a => GHC.Internal.Foreign.Storable.Storable (Linear.Plucker.Plucker a)
instance Data.Semigroup.Traversable.Class.Traversable1 Linear.Plucker.Plucker
instance GHC.Internal.Data.Traversable.Traversable Linear.Plucker.Plucker
instance WithIndex.TraversableWithIndex (Linear.Vector.E Linear.Plucker.Plucker) Linear.Plucker.Plucker
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Unboxed.Base.Unbox (Linear.Plucker.Plucker a)
instance System.Random.Internal.Uniform a => System.Random.Internal.Uniform (Linear.Plucker.Plucker a)
instance System.Random.Internal.UniformRange a => System.Random.Internal.UniformRange (Linear.Plucker.Plucker a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector (Linear.Plucker.Plucker a)

-- | Simple matrix operation for low-dimensional primitives.
module Linear.Trace
class Functor m => Trace (m :: Type -> Type)

-- | Compute the trace of a matrix
--   
--   
--   >>> trace (V2 (V2 a b) (V2 c d))
--   a + d
--   
trace :: (Trace m, Num a) => m (m a) -> a
($dmtrace) :: (Trace m, Foldable m, Num a) => m (m a) -> a

-- | Compute the diagonal of a matrix
--   
--   
--   >>> diagonal (V2 (V2 a b) (V2 c d))
--   V2 a d
--   
diagonal :: Trace m => m (m a) -> m a
($dmdiagonal) :: (Trace m, Monad m) => m (m a) -> m a

-- | Compute the Frobenius norm of a matrix.
frobenius :: (Num a, Foldable f, Additive f, Additive g, Distributive g, Trace g) => f (g a) -> a
instance Linear.Trace.Trace Data.Complex.Complex
instance (Data.Distributive.Distributive g, Linear.Trace.Trace g, Linear.Trace.Trace f) => Linear.Trace.Trace (Data.Functor.Compose.Compose g f)
instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k) => Linear.Trace.Trace (Data.HashMap.Internal.HashMap k)
instance Linear.Trace.Trace Data.IntMap.Internal.IntMap
instance GHC.Classes.Ord k => Linear.Trace.Trace (Data.Map.Internal.Map k)
instance Linear.Trace.Trace Linear.Plucker.Plucker
instance (Linear.Trace.Trace f, Linear.Trace.Trace g) => Linear.Trace.Trace (Data.Functor.Product.Product f g)
instance Linear.Trace.Trace Linear.Quaternion.Quaternion
instance forall k (n :: k). Linear.V.Dim n => Linear.Trace.Trace (Linear.V.V n)
instance Linear.Trace.Trace Linear.V0.V0
instance Linear.Trace.Trace Linear.V1.V1
instance Linear.Trace.Trace Linear.V2.V2
instance Linear.Trace.Trace Linear.V3.V3
instance Linear.Trace.Trace Linear.V4.V4

-- | Utility for working with Plücker coordinates for lines in 3d
--   homogeneous space.
module Linear.Plucker.Coincides

-- | When lines are represented as Plücker coordinates, we have the ability
--   to check for both directed and undirected equality. Undirected
--   equality between Lines (or a Line and a Ray)
--   checks that the two lines coincide in 3D space. Directed equality,
--   between two Rays, checks that two lines coincide in 3D, and
--   have the same direction. To accomodate these two notions of equality,
--   we use an Eq instance on the Coincides data type.
--   
--   For example, to check the directed equality between two lines,
--   p1 and p2, we write, Ray p1 == Ray p2.
data Coincides a
[Line] :: forall a. (Epsilon a, Fractional a) => Plucker a -> Coincides a
[Ray] :: forall a. (Epsilon a, Fractional a, Ord a) => Plucker a -> Coincides a
instance GHC.Classes.Eq (Linear.Plucker.Coincides.Coincides a)

-- | Simple matrix operation for low-dimensional primitives.
module Linear.Matrix

-- | Matrix product. This can compute any combination of sparse and dense
--   multiplication.
--   
--   
--   >>> V2 (V3 1 2 3) (V3 4 5 6) !*! V3 (V2 1 2) (V2 3 4) (V2 4 5)
--   V2 (V2 19 25) (V2 43 58)
--   
--   
--   
--   >>> V2 (IntMap.fromList [(1,2)]) (IntMap.fromList [(2,3)]) !*! IntMap.fromList [(1,V3 0 0 1), (2, V3 0 0 5)]
--   V2 (V3 0 0 2) (V3 0 0 15)
--   
(!*!) :: (Functor m, Foldable t, Additive t, Additive n, Num a) => m (t a) -> t (n a) -> m (n a)
infixl 7 !*!

-- | Entry-wise matrix addition.
--   
--   
--   >>> V2 (V3 1 2 3) (V3 4 5 6) !+! V2 (V3 7 8 9) (V3 1 2 3)
--   V2 (V3 8 10 12) (V3 5 7 9)
--   
(!+!) :: (Additive m, Additive n, Num a) => m (n a) -> m (n a) -> m (n a)
infixl 6 !+!

-- | Entry-wise matrix subtraction.
--   
--   
--   >>> V2 (V3 1 2 3) (V3 4 5 6) !-! V2 (V3 7 8 9) (V3 1 2 3)
--   V2 (V3 (-6) (-6) (-6)) (V3 3 3 3)
--   
(!-!) :: (Additive m, Additive n, Num a) => m (n a) -> m (n a) -> m (n a)
infixl 6 !-!

-- | Matrix * column vector
--   
--   
--   >>> V2 (V3 1 2 3) (V3 4 5 6) !* V3 7 8 9
--   V2 50 122
--   
(!*) :: (Functor m, Foldable r, Additive r, Num a) => m (r a) -> r a -> m a
infixl 7 !*

-- | Row vector * matrix
--   
--   
--   >>> V2 1 2 *! V2 (V3 3 4 5) (V3 6 7 8)
--   V3 15 18 21
--   
(*!) :: (Num a, Foldable t, Additive f, Additive t) => t a -> t (f a) -> f a
infixl 7 *!

-- | Matrix-scalar product
--   
--   
--   >>> V2 (V2 1 2) (V2 3 4) !!* 5
--   V2 (V2 5 10) (V2 15 20)
--   
(!!*) :: (Functor m, Functor r, Num a) => m (r a) -> a -> m (r a)
infixl 7 !!*

-- | Scalar-matrix product
--   
--   
--   >>> 5 *!! V2 (V2 1 2) (V2 3 4)
--   V2 (V2 5 10) (V2 15 20)
--   
(*!!) :: (Functor m, Functor r, Num a) => a -> m (r a) -> m (r a)
infixl 7 *!!

-- | Matrix-scalar division
(!!/) :: (Functor m, Functor r, Fractional a) => m (r a) -> a -> m (r a)
infixl 7 !!/

-- | This is a generalization of inside to work over any
--   corepresentable Functor.
--   
--   
--   column :: Representable f => Lens s t a b -> Lens (f s) (f t) (f a) (f b)
--   
--   
--   In practice it is used to access a column of a matrix.
--   
--   
--   >>> V2 (V3 1 2 3) (V3 4 5 6) ^._x
--   V3 1 2 3
--   
--   
--   
--   >>> V2 (V3 1 2 3) (V3 4 5 6) ^.column _x
--   V2 1 4
--   
column :: forall (f :: Type -> Type) a b s t. Representable f => LensLike (Context a b) s t a b -> Lens (f s) (f t) (f a) (f b)

-- | Hermitian conjugate or conjugate transpose
--   
--   
--   >>> adjoint (V2 (V2 (1 :+ 2) (3 :+ 4)) (V2 (5 :+ 6) (7 :+ 8)))
--   V2 (V2 (1.0 :+ (-2.0)) (5.0 :+ (-6.0))) (V2 (3.0 :+ (-4.0)) (7.0 :+ (-8.0)))
--   
adjoint :: (Functor m, Distributive n, Conjugate a) => m (n a) -> n (m a)

-- | A 2x2 matrix with row-major representation
type M22 a = V2 V2 a

-- | A 2x3 matrix with row-major representation
type M23 a = V2 V3 a

-- | A 2x4 matrix with row-major representation
type M24 a = V2 V4 a

-- | A 3x2 matrix with row-major representation
type M32 a = V3 V2 a

-- | A 3x3 matrix with row-major representation
type M33 a = V3 V3 a

-- | A 3x4 matrix with row-major representation
type M34 a = V3 V4 a

-- | A 4x2 matrix with row-major representation
type M42 a = V4 V2 a

-- | A 4x3 matrix with row-major representation
type M43 a = V4 V3 a

-- | A 4x4 matrix with row-major representation
type M44 a = V4 V4 a

-- | Convert a 3x3 matrix to a 4x4 matrix extending it with 0's in the new
--   row and column.
m33_to_m44 :: Num a => M33 a -> M44 a

-- | Convert from a 4x3 matrix to a 4x4 matrix, extending it with the [
--   0 0 0 1 ] column vector
m43_to_m44 :: Num a => M43 a -> M44 a

-- | 2x2 matrix determinant.
--   
--   
--   >>> det22 (V2 (V2 a b) (V2 c d))
--   a * d - b * c
--   
det22 :: Num a => M22 a -> a

-- | 3x3 matrix determinant.
--   
--   
--   >>> det33 (V3 (V3 a b c) (V3 d e f) (V3 g h i))
--   a * (e * i - f * h) - d * (b * i - c * h) + g * (b * f - c * e)
--   
det33 :: Num a => M33 a -> a

-- | 4x4 matrix determinant.
det44 :: Num a => M44 a -> a

-- | 2x2 matrix inverse.
--   
--   
--   >>> inv22 $ V2 (V2 1 2) (V2 3 4)
--   V2 (V2 (-2.0) 1.0) (V2 1.5 (-0.5))
--   
inv22 :: Fractional a => M22 a -> M22 a

-- | 3x3 matrix inverse.
--   
--   
--   >>> inv33 $ V3 (V3 1 2 4) (V3 4 2 2) (V3 1 1 1)
--   V3 (V3 0.0 0.5 (-1.0)) (V3 (-0.5) (-0.75) 3.5) (V3 0.5 0.25 (-1.5))
--   
inv33 :: Fractional a => M33 a -> M33 a

-- | 4x4 matrix inverse.
inv44 :: Fractional a => M44 a -> M44 a

-- | The identity matrix for any dimension vector.
--   
--   
--   >>> identity :: M44 Int
--   V4 (V4 1 0 0 0) (V4 0 1 0 0) (V4 0 0 1 0) (V4 0 0 0 1)
--   
--   >>> identity :: V3 (V3 Int)
--   V3 (V3 1 0 0) (V3 0 1 0) (V3 0 0 1)
--   
identity :: (Num a, Traversable t, Applicative t) => t (t a)
class Functor m => Trace (m :: Type -> Type)

-- | Compute the trace of a matrix
--   
--   
--   >>> trace (V2 (V2 a b) (V2 c d))
--   a + d
--   
trace :: (Trace m, Num a) => m (m a) -> a
($dmtrace) :: (Trace m, Foldable m, Num a) => m (m a) -> a

-- | Compute the diagonal of a matrix
--   
--   
--   >>> diagonal (V2 (V2 a b) (V2 c d))
--   V2 a d
--   
diagonal :: Trace m => m (m a) -> m a
($dmdiagonal) :: (Trace m, Monad m) => m (m a) -> m a

-- | Extract the translation vector (first three entries of the last
--   column) from a 3x4 or 4x4 matrix.
translation :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R3 t, R4 v) => Lens' (t (v a)) (V3 a)

-- | transpose is just an alias for distribute
--   
--   
--   transpose (V3 (V2 1 2) (V2 3 4) (V2 5 6))
--   
--   
--   V2 (V3 1 3 5) (V3 2 4 6)
transpose :: (Distributive g, Functor f) => f (g a) -> g (f a)

-- | Build a rotation matrix from a unit Quaternion.
fromQuaternion :: Num a => Quaternion a -> M33 a

-- | Build a transformation matrix from a rotation expressed as a
--   Quaternion and a translation vector.
mkTransformation :: Num a => Quaternion a -> V3 a -> M44 a

-- | Build a transformation matrix from a rotation matrix and a translation
--   vector.
mkTransformationMat :: Num a => M33 a -> V3 a -> M44 a

-- | Extract a 2x2 matrix from a matrix of higher dimensions by dropping
--   excess rows and columns.
_m22 :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R2 t, R2 v) => Lens' (t (v a)) (M22 a)

-- | Extract a 2x3 matrix from a matrix of higher dimensions by dropping
--   excess rows and columns.
_m23 :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R2 t, R3 v) => Lens' (t (v a)) (M23 a)

-- | Extract a 2x4 matrix from a matrix of higher dimensions by dropping
--   excess rows and columns.
_m24 :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R2 t, R4 v) => Lens' (t (v a)) (M24 a)

-- | Extract a 3x2 matrix from a matrix of higher dimensions by dropping
--   excess rows and columns.
_m32 :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R3 t, R2 v) => Lens' (t (v a)) (M32 a)

-- | Extract a 3x3 matrix from a matrix of higher dimensions by dropping
--   excess rows and columns.
_m33 :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R3 t, R3 v) => Lens' (t (v a)) (M33 a)

-- | Extract a 3x4 matrix from a matrix of higher dimensions by dropping
--   excess rows and columns.
_m34 :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R3 t, R4 v) => Lens' (t (v a)) (M34 a)

-- | Extract a 4x2 matrix from a matrix of higher dimensions by dropping
--   excess rows and columns.
_m42 :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R4 t, R2 v) => Lens' (t (v a)) (M42 a)

-- | Extract a 4x3 matrix from a matrix of higher dimensions by dropping
--   excess rows and columns.
_m43 :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R4 t, R3 v) => Lens' (t (v a)) (M43 a)

-- | Extract a 4x4 matrix from a matrix of higher dimensions by dropping
--   excess rows and columns.
_m44 :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R4 t, R4 v) => Lens' (t (v a)) (M44 a)

-- | Compute the (L, U) decomposition of a square matrix using Crout's
--   algorithm. The Index of the vectors must be Integral.
lu :: (Num a, Fractional a, Foldable m, Traversable m, Applicative m, Additive m, Ixed (m a), Ixed (m (m a)), i ~ Index (m a), i ~ Index (m (m a)), Eq i, Integral i, a ~ IxValue (m a), m a ~ IxValue (m (m a)), Num (m a)) => m (m a) -> (m (m a), m (m a))

-- | Compute the (L, U) decomposition of a square matrix using Crout's
--   algorithm, using the vector's Finite instance to provide an
--   index.
luFinite :: forall a m (n :: Nat). (Num a, Fractional a, Functor m, Finite m, n ~ Size m, KnownNat n, Num (m a)) => m (m a) -> (m (m a), m (m a))

-- | Solve a linear system with a lower-triangular matrix of coefficients
--   with forwards substitution.
forwardSub :: (Num a, Fractional a, Foldable m, Additive m, Ixed (m a), Ixed (m (m a)), i ~ Index (m a), i ~ Index (m (m a)), Eq i, Ord i, Integral i, a ~ IxValue (m a), m a ~ IxValue (m (m a))) => m (m a) -> m a -> m a

-- | Solve a linear system with a lower-triangular matrix of coefficients
--   with forwards substitution, using the vector's Finite instance
--   to provide an index.
forwardSubFinite :: forall a m (n :: Nat). (Num a, Fractional a, Foldable m, n ~ Size m, KnownNat n, Additive m, Finite m) => m (m a) -> m a -> m a

-- | Solve a linear system with an upper-triangular matrix of coefficients
--   with backwards substitution.
backwardSub :: (Num a, Fractional a, Foldable m, Additive m, Ixed (m a), Ixed (m (m a)), i ~ Index (m a), i ~ Index (m (m a)), Eq i, Ord i, Integral i, a ~ IxValue (m a), m a ~ IxValue (m (m a))) => m (m a) -> m a -> m a

-- | Solve a linear system with an upper-triangular matrix of coefficients
--   with backwards substitution, using the vector's Finite instance
--   to provide an index.
backwardSubFinite :: forall a m (n :: Nat). (Num a, Fractional a, Foldable m, n ~ Size m, KnownNat n, Additive m, Finite m) => m (m a) -> m a -> m a

-- | Solve a linear system with LU decomposition.
luSolve :: (Num a, Fractional a, Foldable m, Traversable m, Applicative m, Additive m, Ixed (m a), Ixed (m (m a)), i ~ Index (m a), i ~ Index (m (m a)), Eq i, Integral i, a ~ IxValue (m a), m a ~ IxValue (m (m a)), Num (m a)) => m (m a) -> m a -> m a

-- | Solve a linear system with LU decomposition, using the vector's
--   Finite instance to provide an index.
luSolveFinite :: forall a m (n :: Nat). (Num a, Fractional a, Functor m, Finite m, n ~ Size m, KnownNat n, Num (m a)) => m (m a) -> m a -> m a

-- | Invert a matrix with LU decomposition.
luInv :: (Num a, Fractional a, Foldable m, Traversable m, Applicative m, Additive m, Distributive m, Ixed (m a), Ixed (m (m a)), i ~ Index (m a), i ~ Index (m (m a)), Eq i, Integral i, a ~ IxValue (m a), m a ~ IxValue (m (m a)), Num (m a)) => m (m a) -> m (m a)

-- | Invert a matrix with LU decomposition, using the vector's
--   Finite instance to provide an index.
luInvFinite :: forall a m (n :: Nat). (Num a, Fractional a, Functor m, Finite m, n ~ Size m, KnownNat n, Num (m a)) => m (m a) -> m (m a)

-- | Compute the determinant of a matrix using LU decomposition.
luDet :: (Num a, Fractional a, Foldable m, Traversable m, Applicative m, Additive m, Trace m, Ixed (m a), Ixed (m (m a)), i ~ Index (m a), i ~ Index (m (m a)), Eq i, Integral i, a ~ IxValue (m a), m a ~ IxValue (m (m a)), Num (m a)) => m (m a) -> a

-- | Compute the determinant of a matrix using LU decomposition, using the
--   vector's Finite instance to provide an index.
luDetFinite :: forall a m (n :: Nat). (Num a, Fractional a, Functor m, Finite m, n ~ Size m, KnownNat n, Num (m a)) => m (m a) -> a

-- | Common projection matrices: e.g. perspective/orthographic
--   transformation matrices.
--   
--   Analytically derived inverses are also supplied, because they can be
--   much more accurate in practice than computing them through general
--   purpose means
module Linear.Projection

-- | Build a look at view matrix
lookAt :: (Epsilon a, Floating a) => V3 a -> V3 a -> V3 a -> M44 a

-- | Build a matrix for a symmetric perspective-view frustum
perspective :: Floating a => a -> a -> a -> a -> M44 a

-- | Build an inverse perspective matrix
inversePerspective :: Floating a => a -> a -> a -> a -> M44 a

-- | Build a matrix for a symmetric perspective-view frustum with a far
--   plane at infinite
infinitePerspective :: Floating a => a -> a -> a -> M44 a
inverseInfinitePerspective :: Floating a => a -> a -> a -> M44 a

-- | Build a perspective matrix per the classic glFrustum
--   arguments.
frustum :: Floating a => a -> a -> a -> a -> a -> a -> M44 a
inverseFrustum :: Floating a => a -> a -> a -> a -> a -> a -> M44 a

-- | Build an orthographic perspective matrix from 6 clipping planes. This
--   matrix takes the region delimited by these planes and maps it to
--   normalized device coordinates between [-1,1]
--   
--   This call is designed to mimic the parameters to the OpenGL
--   glOrtho call, so it has a slightly strange convention:
--   Notably: the near and far planes are negated.
--   
--   Consequently:
--   
--   
--   ortho l r b t n f !* V4 l b (-n) 1 = V4 (-1) (-1) (-1) 1
--   ortho l r b t n f !* V4 r t (-f) 1 = V4 1 1 1 1
--   
--   
--   Examples:
--   
--   
--   >>> ortho 1 2 3 4 5 6 !* V4 1 3 (-5) 1
--   V4 (-1.0) (-1.0) (-1.0) 1.0
--   
--   
--   
--   >>> ortho 1 2 3 4 5 6 !* V4 2 4 (-6) 1
--   V4 1.0 1.0 1.0 1.0
--   
ortho :: Fractional a => a -> a -> a -> a -> a -> a -> M44 a

-- | Build an inverse orthographic perspective matrix from 6 clipping
--   planes
inverseOrtho :: Fractional a => a -> a -> a -> a -> a -> a -> M44 a

module Linear.Algebra

-- | An associative unital algebra over a ring
class Num r => Algebra r m
mult :: Algebra r m => (m -> m -> r) -> m -> r
unital :: Algebra r m => r -> m -> r

-- | A coassociative counital coalgebra over a ring
class Num r => Coalgebra r m
comult :: Coalgebra r m => (m -> r) -> m -> m -> r
counital :: Coalgebra r m => (m -> r) -> r
multRep :: (Representable f, Algebra r (Rep f)) => f (f r) -> f r
unitalRep :: (Representable f, Algebra r (Rep f)) => r -> f r
comultRep :: (Representable f, Coalgebra r (Rep f)) => f r -> f (f r)
counitalRep :: (Representable f, Coalgebra r (Rep f)) => f r -> r
instance GHC.Internal.Num.Num r => Linear.Algebra.Algebra r (Linear.Vector.E Linear.V0.V0)
instance GHC.Internal.Num.Num r => Linear.Algebra.Algebra r (Linear.Vector.E Linear.V1.V1)
instance GHC.Internal.Num.Num r => Linear.Algebra.Algebra r (Linear.Vector.E Data.Complex.Complex)
instance (GHC.Internal.Num.Num r, Linear.Conjugate.TrivialConjugate r) => Linear.Algebra.Algebra r (Linear.Vector.E Linear.Quaternion.Quaternion)
instance (Linear.Algebra.Algebra r a, Linear.Algebra.Algebra r b) => Linear.Algebra.Algebra r (a, b)
instance GHC.Internal.Num.Num r => Linear.Algebra.Algebra r ()
instance GHC.Internal.Num.Num r => Linear.Algebra.Algebra r GHC.Internal.Base.Void
instance GHC.Internal.Num.Num r => Linear.Algebra.Coalgebra r (Linear.Vector.E Linear.V0.V0)
instance GHC.Internal.Num.Num r => Linear.Algebra.Coalgebra r (Linear.Vector.E Linear.V1.V1)
instance GHC.Internal.Num.Num r => Linear.Algebra.Coalgebra r (Linear.Vector.E Linear.V2.V2)
instance GHC.Internal.Num.Num r => Linear.Algebra.Coalgebra r (Linear.Vector.E Linear.V3.V3)
instance GHC.Internal.Num.Num r => Linear.Algebra.Coalgebra r (Linear.Vector.E Linear.V4.V4)
instance GHC.Internal.Num.Num r => Linear.Algebra.Coalgebra r (Linear.Vector.E Data.Complex.Complex)
instance (GHC.Internal.Num.Num r, Linear.Conjugate.TrivialConjugate r) => Linear.Algebra.Coalgebra r (Linear.Vector.E Linear.Quaternion.Quaternion)
instance (Linear.Algebra.Coalgebra r m, Linear.Algebra.Coalgebra r n) => Linear.Algebra.Coalgebra r (m, n)
instance GHC.Internal.Num.Num r => Linear.Algebra.Coalgebra r ()
instance GHC.Internal.Num.Num r => Linear.Algebra.Coalgebra r GHC.Internal.Base.Void

-- | Operations on affine spaces.
module Linear.Covector

-- | Linear functionals from elements of an (infinite) free module to a
--   scalar
newtype Covector r a
Covector :: ((a -> r) -> r) -> Covector r a
[runCovector] :: Covector r a -> (a -> r) -> r
($*) :: Representable f => Covector r (Rep f) -> f r -> r
infixr 0 $*
instance GHC.Internal.Num.Num r => Data.Functor.Alt.Alt (Linear.Covector.Covector r)
instance GHC.Internal.Num.Num r => GHC.Internal.Base.Alternative (Linear.Covector.Covector r)
instance GHC.Internal.Base.Applicative (Linear.Covector.Covector r)
instance Data.Functor.Bind.Class.Apply (Linear.Covector.Covector r)
instance Data.Functor.Bind.Class.Bind (Linear.Covector.Covector r)
instance GHC.Internal.Base.Functor (Linear.Covector.Covector r)
instance GHC.Internal.Base.Monad (Linear.Covector.Covector r)
instance GHC.Internal.Num.Num r => GHC.Internal.Base.MonadPlus (Linear.Covector.Covector r)
instance Linear.Algebra.Coalgebra r m => GHC.Internal.Num.Num (Linear.Covector.Covector r m)
instance GHC.Internal.Num.Num r => Data.Functor.Plus.Plus (Linear.Covector.Covector r)

-- | Operations on affine spaces.
module Linear.Affine

-- | An affine space is roughly a vector space in which we have forgotten
--   or at least pretend to have forgotten the origin.
--   
--   
--   a .+^ (b .-. a)  =  b@
--   (a .+^ u) .+^ v  =  a .+^ (u ^+^ v)@
--   (a .-. b) ^+^ v  =  (a .+^ v) .-. q@
--   
class Additive Diff p => Affine (p :: Type -> Type) where {
    type Diff (p :: Type -> Type) :: Type -> Type;
}

-- | Get the difference between two points as a vector offset.
(.-.) :: (Affine p, Num a) => p a -> p a -> Diff p a

-- | Add a vector offset to a point.
(.+^) :: (Affine p, Num a) => p a -> Diff p a -> p a

-- | Subtract a vector offset from a point.
(.-^) :: (Affine p, Num a) => p a -> Diff p a -> p a
infixl 6 .-.
infixl 6 .+^
infixl 6 .-^

-- | Compute the quadrance of the difference (the square of the distance)
qdA :: (Affine p, Foldable (Diff p), Num a) => p a -> p a -> a

-- | Distance between two points in an affine space
distanceA :: (Floating a, Foldable (Diff p), Affine p) => p a -> p a -> a

-- | A handy wrapper to help distinguish points from vectors at the type
--   level
newtype Point (f :: Type -> Type) a
P :: f a -> Point (f :: Type -> Type) a
lensP :: forall f1 a g b f2. Functor f2 => (f1 a -> f2 (g b)) -> Point f1 a -> f2 (Point g b)
_Point :: forall f1 a g b p f2. (Profunctor p, Functor f2) => p (f1 a) (f2 (g b)) -> p (Point f1 a) (f2 (Point g b))
(.#) :: Coercible b a => (b -> c) -> (a -> b) -> a -> c
(#.) :: Coercible c b => (b -> c) -> (a -> b) -> a -> c
unP :: Point f a -> f a

-- | Vector spaces have origins.
origin :: forall (f :: Type -> Type) a. (Additive f, Num a) => Point f a

-- | An isomorphism between points and vectors, given a reference point.
relative :: forall (f :: Type -> Type) a. (Additive f, Num a) => Point f a -> Iso' (Point f a) (f a)
instance Linear.Vector.Additive f => Linear.Vector.Additive (Linear.Affine.Point f)
instance Linear.Affine.Affine Data.Complex.Complex
instance Linear.Affine.Affine ((->) b)
instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k) => Linear.Affine.Affine (Data.HashMap.Internal.HashMap k)
instance Linear.Affine.Affine GHC.Internal.Data.Functor.Identity.Identity
instance Linear.Affine.Affine Data.IntMap.Internal.IntMap
instance Linear.Affine.Affine []
instance GHC.Classes.Ord k => Linear.Affine.Affine (Data.Map.Internal.Map k)
instance Linear.Affine.Affine GHC.Internal.Maybe.Maybe
instance Linear.Affine.Affine Linear.Plucker.Plucker
instance Linear.Vector.Additive f => Linear.Affine.Affine (Linear.Affine.Point f)
instance (Linear.Affine.Affine f, Linear.Affine.Affine g) => Linear.Affine.Affine (Data.Functor.Product.Product f g)
instance Linear.Affine.Affine Linear.Quaternion.Quaternion
instance Linear.V.Dim n => Linear.Affine.Affine (Linear.V.V n)
instance Linear.Affine.Affine Linear.V0.V0
instance Linear.Affine.Affine Linear.V1.V1
instance Linear.Affine.Affine Linear.V2.V2
instance Linear.Affine.Affine Linear.V3.V3
instance Linear.Affine.Affine Linear.V4.V4
instance Linear.Affine.Affine Data.Vector.Vector
instance Linear.Affine.Affine GHC.Internal.Functor.ZipList.ZipList
instance GHC.Internal.Base.Applicative f => GHC.Internal.Base.Applicative (Linear.Affine.Point f)
instance Data.Functor.Bind.Class.Apply f => Data.Functor.Bind.Class.Apply (Linear.Affine.Point f)
instance Data.Binary.Class.Binary (f a) => Data.Binary.Class.Binary (Linear.Affine.Point f a)
instance Data.Functor.Bind.Class.Bind f => Data.Functor.Bind.Class.Bind (Linear.Affine.Point f)
instance (GHC.Internal.Data.Typeable.Internal.Typeable f, GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Data.Data.Data (f a)) => GHC.Internal.Data.Data.Data (Linear.Affine.Point f a)
instance Data.Distributive.Distributive f => Data.Distributive.Distributive (Linear.Affine.Point f)
instance GHC.Internal.Data.Traversable.Traversable f => Control.Lens.Each.Each (Linear.Affine.Point f a) (Linear.Affine.Point f b) a b
instance Linear.Epsilon.Epsilon (f a) => Linear.Epsilon.Epsilon (Linear.Affine.Point f a)
instance Data.Functor.Classes.Eq1 f => Data.Functor.Classes.Eq1 (Linear.Affine.Point f)
instance GHC.Classes.Eq (f a) => GHC.Classes.Eq (Linear.Affine.Point f a)
instance Linear.V.Finite f => Linear.V.Finite (Linear.Affine.Point f)
instance GHC.Internal.Data.Foldable.Foldable f => GHC.Internal.Data.Foldable.Foldable (Linear.Affine.Point f)
instance GHC.Internal.Real.Fractional (f a) => GHC.Internal.Real.Fractional (Linear.Affine.Point f a)
instance GHC.Internal.Base.Functor f => GHC.Internal.Base.Functor (Linear.Affine.Point f)
instance GHC.Internal.Generics.Generic1 (Linear.Affine.Point f)
instance GHC.Internal.Generics.Generic (Linear.Affine.Point f a)
instance Data.Hashable.Class.Hashable1 f => Data.Hashable.Class.Hashable1 (Linear.Affine.Point f)
instance Data.Hashable.Class.Hashable (f a) => Data.Hashable.Class.Hashable (Linear.Affine.Point f a)
instance GHC.Internal.Ix.Ix (f a) => GHC.Internal.Ix.Ix (Linear.Affine.Point f a)
instance Control.Lens.At.Ixed (f a) => Control.Lens.At.Ixed (Linear.Affine.Point f a)
instance Data.Vector.Unboxed.Base.Unbox (f a) => Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector (Linear.Affine.Point f a)
instance Linear.Metric.Metric f => Linear.Metric.Metric (Linear.Affine.Point f)
instance GHC.Internal.Base.Monad f => GHC.Internal.Base.Monad (Linear.Affine.Point f)
instance GHC.Internal.Base.Monoid (f a) => GHC.Internal.Base.Monoid (Linear.Affine.Point f a)
instance Control.DeepSeq.NFData (f a) => Control.DeepSeq.NFData (Linear.Affine.Point f a)
instance GHC.Internal.Num.Num (f a) => GHC.Internal.Num.Num (Linear.Affine.Point f a)
instance Data.Functor.Classes.Ord1 f => Data.Functor.Classes.Ord1 (Linear.Affine.Point f)
instance GHC.Classes.Ord (f a) => GHC.Classes.Ord (Linear.Affine.Point f a)
instance Linear.V1.R1 f => Linear.V1.R1 (Linear.Affine.Point f)
instance Linear.V2.R2 f => Linear.V2.R2 (Linear.Affine.Point f)
instance Linear.V3.R3 f => Linear.V3.R3 (Linear.Affine.Point f)
instance Linear.V4.R4 f => Linear.V4.R4 (Linear.Affine.Point f)
instance System.Random.Random (f a) => System.Random.Random (Linear.Affine.Point f a)
instance Data.Functor.Classes.Read1 f => Data.Functor.Classes.Read1 (Linear.Affine.Point f)
instance GHC.Internal.Read.Read (f a) => GHC.Internal.Read.Read (Linear.Affine.Point f a)
instance Data.Functor.Rep.Representable f => Data.Functor.Rep.Representable (Linear.Affine.Point f)
instance (t GHC.Types.~ Linear.Affine.Point g b) => Control.Lens.Wrapped.Rewrapped (Linear.Affine.Point f a) t
instance GHC.Internal.Base.Semigroup (f a) => GHC.Internal.Base.Semigroup (Linear.Affine.Point f a)
instance Data.Bytes.Serial.Serial1 f => Data.Bytes.Serial.Serial1 (Linear.Affine.Point f)
instance Data.Bytes.Serial.Serial (f a) => Data.Bytes.Serial.Serial (Linear.Affine.Point f a)
instance Data.Serialize.Serialize (f a) => Data.Serialize.Serialize (Linear.Affine.Point f a)
instance Data.Functor.Classes.Show1 f => Data.Functor.Classes.Show1 (Linear.Affine.Point f)
instance GHC.Internal.Show.Show (f a) => GHC.Internal.Show.Show (Linear.Affine.Point f a)
instance GHC.Internal.Foreign.Storable.Storable (f a) => GHC.Internal.Foreign.Storable.Storable (Linear.Affine.Point f a)
instance GHC.Internal.Data.Traversable.Traversable f => GHC.Internal.Data.Traversable.Traversable (Linear.Affine.Point f)
instance Data.Vector.Unboxed.Base.Unbox (f a) => Data.Vector.Unboxed.Base.Unbox (Linear.Affine.Point f a)
instance Data.Vector.Unboxed.Base.Unbox (f a) => Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector (Linear.Affine.Point f a)
instance Control.Lens.Wrapped.Wrapped (Linear.Affine.Point f a)

-- | This module simply re-exports everything from the various modules that
--   make up the linear package.
module Linear
