packages feed

linear 1.17 → 1.17.1

raw patch · 11 files changed

+83/−4 lines, 11 filesdep +transformers-compatdep ~transformers

Dependencies added: transformers-compat

Dependency ranges changed: transformers

Files

CHANGELOG.markdown view
@@ -1,3 +1,12 @@+1.17.1+------+* Added support for `Data.Functor.Classes` from `transformers` 0.5 via `transformers-compat`.+* Added missing support for `binary`, `bytes` and `cereal` for `Point`++1.17+----+* Better support for `binary`. Added support for `bytes` and `cereal`+ 1.16.4 ------ * `ortho` and `inverseOrtho` now only require a `Fractional` constraint.
linear.cabal view
@@ -1,6 +1,6 @@ name:          linear category:      Math, Algebra-version:       1.17+version:       1.17.1 license:       BSD3 cabal-version: >= 1.8 license-file:  LICENSE@@ -47,6 +47,7 @@     tagged               >= 0.4.4 && < 1,     template-haskell     >= 2.7   && < 3.0,     transformers         >= 0.2   && < 0.5,+    transformers-compat  >= 0.4   && < 1,     unordered-containers >= 0.2.3 && < 0.3,     vector               >= 0.10  && < 0.11,     void                 >= 0.6   && < 1
src/Linear/Affine.hs view
@@ -28,18 +28,23 @@ module Linear.Affine where  import Control.Applicative+import Control.Monad (liftM) import Control.Lens+import Data.Binary as Binary+import Data.Bytes.Serial import Data.Complex (Complex) import Data.Data import Data.Distributive import Data.Foldable as Foldable import Data.Functor.Bind+import Data.Functor.Classes import Data.Functor.Rep as Rep import Data.HashMap.Lazy (HashMap) import Data.Hashable import Data.IntMap (IntMap) import Data.Ix import Data.Map (Map)+import Data.Serialize as Cereal import Data.Vector (Vector) import Foreign.Storable #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702@@ -125,6 +130,7 @@ -- type level newtype Point f a = P (f a)   deriving ( Eq, Ord, Show, Read, Monad, Functor, Applicative, Foldable+           , Eq1, Ord1, Show1, Read1            , Traversable, Apply, Additive, Metric            , Fractional , Num, Ix, Storable, Epsilon            , Hashable@@ -138,6 +144,23 @@            , Typeable, Data #endif            )+++instance Serial1 f => Serial1 (Point f) where+  serializeWith f (P p) = serializeWith f p+  deserializeWith m = P `liftM` deserializeWith m++instance Serial (f a) => Serial (Point f a) where+  serialize (P p) = serialize p+  deserialize = P `liftM` deserialize++instance Binary (f a) => Binary (Point f a) where+  put (P p) = Binary.put p+  get = P `liftM` Binary.get++instance Serialize (f a) => Serialize (Point f a) where+  put (P p) = Cereal.put p+  get = P `liftM` Cereal.get  #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ < 708 instance forall f. Typeable1 f => Typeable1 (Point f) where
src/Linear/Plucker.hs view
@@ -56,6 +56,7 @@ import Data.Distributive import Data.Foldable as Foldable import Data.Functor.Bind+import Data.Functor.Classes import Data.Functor.Rep import Data.Hashable import Data.Semigroup@@ -576,3 +577,8 @@ instance Serialize a => Serialize (Plucker a) where   put = serializeWith Cereal.put   get = deserializeWith Cereal.get++instance Eq1 Plucker where eq1 = (==)+instance Ord1 Plucker where compare1 = compare+instance Show1 Plucker where showsPrec1 = showsPrec+instance Read1 Plucker where readsPrec1 = readsPrec
src/Linear/Quaternion.hs view
@@ -46,12 +46,12 @@ import Control.Lens hiding ((<.>)) import Data.Binary as Binary import Data.Bytes.Serial- import Data.Complex (Complex((:+))) import Data.Data import Data.Distributive import Data.Foldable import Data.Functor.Bind+import Data.Functor.Classes import Data.Functor.Rep import Data.Hashable import Data.Serialize as Cereal@@ -569,3 +569,8 @@ instance Serialize a => Serialize (Quaternion a) where   put = serializeWith Cereal.put   get = deserializeWith Cereal.get++instance Eq1 Quaternion where eq1 = (==)+instance Ord1 Quaternion where compare1 = compare+instance Show1 Quaternion where showsPrec1 = showsPrec+instance Read1 Quaternion where readsPrec1 = readsPrec
src/Linear/V.hs view
@@ -53,6 +53,7 @@ import Data.Distributive import Data.Foldable as Foldable import Data.Functor.Bind+import Data.Functor.Classes import Data.Functor.Rep as Rep #if __GLASGOW_HASKELL__ < 708 import Data.Proxy@@ -391,3 +392,8 @@ instance (Dim n, Serialize a) => Serialize (V n a) where   put = serializeWith Cereal.put   get = deserializeWith Cereal.get++instance Dim n => Eq1 (V n) where eq1 = (==)+instance Dim n => Ord1 (V n) where compare1 = compare+instance Dim n => Show1 (V n) where showsPrec1 = showsPrec+instance Dim n => Read1 (V n) where readsPrec1 = readsPrec
src/Linear/V0.hs view
@@ -37,8 +37,9 @@ import Data.Data import Data.Distributive import Data.Foldable-import Data.Functor.Rep import Data.Functor.Bind+import Data.Functor.Classes+import Data.Functor.Rep import Data.Hashable import Data.Ix import Data.Semigroup@@ -288,3 +289,8 @@  instance NFData (V0 a) where   rnf V0 = ()++instance Eq1 V0   where eq1 = (==)+instance Ord1 V0  where compare1 = compare+instance Show1 V0 where showsPrec1 = showsPrec+instance Read1 V0 where readsPrec1 = readsPrec
src/Linear/V1.hs view
@@ -47,6 +47,7 @@ import Data.Distributive import Data.Foldable import Data.Functor.Bind+import Data.Functor.Classes import Data.Functor.Rep import Data.Hashable import Data.Semigroup.Foldable@@ -323,3 +324,7 @@   put = serializeWith Cereal.put   get = deserializeWith Cereal.get +instance Eq1 V1 where eq1 = (==)+instance Ord1 V1 where compare1 = compare+instance Show1 V1 where showsPrec1 = showsPrec+instance Read1 V1 where readsPrec1 = readsPrec
src/Linear/V2.hs view
@@ -42,9 +42,10 @@ import Data.Data import Data.Distributive import Data.Foldable-import Data.Hashable import Data.Functor.Bind+import Data.Functor.Classes import Data.Functor.Rep+import Data.Hashable import Data.Semigroup import Data.Semigroup.Foldable import Data.Serialize as Cereal@@ -384,3 +385,8 @@ instance Serialize a => Serialize (V2 a) where   put = serializeWith Cereal.put   get = deserializeWith Cereal.get++instance Eq1 V2 where eq1 = (==)+instance Ord1 V2 where compare1 = compare+instance Show1 V2 where showsPrec1 = showsPrec+instance Read1 V2 where readsPrec1 = readsPrec
src/Linear/V3.hs view
@@ -44,6 +44,7 @@ import Data.Distributive import Data.Foldable import Data.Functor.Bind+import Data.Functor.Classes import Data.Functor.Rep import Data.Hashable import Data.Semigroup@@ -407,3 +408,8 @@ instance Serialize a => Serialize (V3 a) where   put = serializeWith Cereal.put   get = deserializeWith Cereal.get++instance Eq1 V3 where eq1 = (==)+instance Ord1 V3 where compare1 = compare+instance Show1 V3 where showsPrec1 = showsPrec+instance Read1 V3 where readsPrec1 = readsPrec
src/Linear/V4.hs view
@@ -51,6 +51,7 @@ import Data.Distributive import Data.Foldable import Data.Functor.Bind+import Data.Functor.Classes import Data.Functor.Rep import Data.Hashable import Data.Semigroup@@ -554,3 +555,8 @@ instance Serialize a => Serialize (V4 a) where   put = serializeWith Cereal.put   get = deserializeWith Cereal.get++instance Eq1 V4 where eq1 = (==)+instance Ord1 V4 where compare1 = compare+instance Show1 V4 where showsPrec1 = showsPrec+instance Read1 V4 where readsPrec1 = readsPrec