packages feed

linear 1.10 → 1.10.1

raw patch · 5 files changed

+33/−8 lines, 5 files

Files

CHANGELOG.markdown view
@@ -1,6 +1,10 @@+1.10.1+------+* Added `Linear.V2.angle`.+ 1.10 -----* Added `Hashable` instances+* Added `Hashable` instances.  1.9.1 -----
linear.cabal view
@@ -1,6 +1,6 @@ name:          linear category:      Math, Algebra-version:       1.10+version:       1.10.1 license:       BSD3 cabal-version: >= 1.8 license-file:  LICENSE
src/Linear.hs view
@@ -12,6 +12,7 @@ ---------------------------------------------------------------------------- module Linear   ( module Linear.Algebra+  , module Linear.Binary   , module Linear.Conjugate   , module Linear.Covector   , module Linear.Epsilon@@ -28,6 +29,7 @@   )  where  import Linear.Algebra+import Linear.Binary import Linear.Conjugate import Linear.Covector import Linear.Epsilon
src/Linear/Binary.hs view
@@ -1,6 +1,20 @@--- | Serialization of statically-sized types with the "Data.Binary"+-----------------------------------------------------------------------------+-- |+-- Copyright   :  (C) 2013-2014 Edward Kmett and Anthony Cowley+-- License     :  BSD-style (see the file LICENSE)+--+-- Maintainer  :  Edward Kmett <ekmett@gmail.com>+-- Stability   :  experimental+-- Portability :  non-portable+--+-- Serialization of statically-sized types with the "Data.Binary" -- library.-module Linear.Binary where+------------------------------------------------------------------------------+module Linear.Binary+  ( putLinear+  , getLinear+  ) where+ import Control.Applicative import Data.Binary import Data.Foldable (Foldable, traverse_)
src/Linear/V2.hs view
@@ -26,6 +26,7 @@   , R2(..)   , ex, ey   , perp+  , angle   ) where  import Control.Applicative@@ -76,14 +77,15 @@ -- >>> sum (V2 1 2) -- 3 -data V2 a = V2 !a !a deriving (Eq,Ord,Show,Read,Data,Typeable+data V2 a = V2 !a !a deriving+  (Eq,Ord,Show,Read,Data,Typeable #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702-                              ,Generic+  ,Generic #endif #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 706-                              ,Generic1+  ,Generic1 #endif-                              )+  )  instance Functor V2 where   fmap f (V2 a b) = V2 (f a) (f b)@@ -315,3 +317,6 @@ instance MonadFix V2 where   mfix f = V2 (let V2 a _ = f a in a)               (let V2 _ a = f a in a)++angle :: Floating a => a -> V2 a+angle a = V2 (cos a) (sin a)