packages feed

spatial-math 0.2.1.1 → 0.2.1.2

raw patch · 3 files changed

+11/−16 lines, 3 filesdep +binarydep ~linear

Dependencies added: binary

Dependency ranges changed: linear

Files

spatial-math.cabal view
@@ -1,5 +1,5 @@ name:                spatial-math-version:             0.2.1.1+version:             0.2.1.2 synopsis:            3d math including quaternions/euler angles/dcms and utility functions description:         This is a port of my 'mathlib' C library: `https://github.com/ghorn/mathlib` license:             BSD3@@ -22,7 +22,8 @@   build-depends:       base >= 4 && < 5,                        ghc-prim,                        cereal,-                       linear >= 1.3.1+                       binary,+                       linear >= 1.17.1   default-language:    Haskell2010  source-repository head
src/SpatialMathT.hs view
@@ -19,6 +19,7 @@  import Control.Applicative ( Applicative ) import Data.Foldable ( Foldable )+import Data.Binary ( Binary(..) ) import Data.Serialize ( Serialize(..) ) import Data.Traversable ( Traversable ) import Foreign.Storable ( Storable )@@ -35,19 +36,9 @@                          , Additive, Storable                          , Num, Fractional, Eq, Show                          , Generic1, Generic+                         , Serialize, Binary                          ) -instance Serialize a => Serialize (V3T f a) where-  get = do-    x <- get-    y <- get-    z <- get-    return (V3T (V3 x y z))-  put (V3T (V3 x y z)) = do-    put x-    put y-    put z- cross :: Num a => V3T f a -> V3T f a -> V3T f a cross (V3T vx) (V3T vy) = V3T (vx `L.cross` vy) @@ -55,8 +46,9 @@   Rot { unR :: r }   deriving ( Functor, Foldable, Traversable            , Storable-           , Num, Fractional, Eq, Show, Serialize+           , Num, Fractional, Eq, Show            , Generic1, Generic+           , Serialize, Binary            )  type M33T f1 f2 a = V3T f1 (V3T f2 a)
src/Types.hs view
@@ -15,11 +15,12 @@ import Data.Foldable ( Foldable ) import Data.Traversable ( Traversable ) #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702-import GHC.Generics (Generic)+import GHC.Generics ( Generic ) import Data.Serialize ( Serialize )+import Data.Binary ( Binary ) #endif #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 706-import GHC.Generics (Generic1)+import GHC.Generics ( Generic1 ) #endif #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 708 import Data.Typeable ( Typeable )@@ -51,4 +52,5 @@  #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702 instance Serialize a => Serialize (Euler a)+instance Binary a => Binary (Euler a) #endif