packages feed

smoothie 0.4.1 → 0.4.2

raw patch · 3 files changed

+11/−4 lines, 3 filesdep ~aeson

Dependency ranges changed: aeson

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+## 0.4.2++- Support for aeson-0.10.+ ## 0.4.1  - Added support for linear-1.20.
smoothie.cabal view
@@ -1,5 +1,5 @@ name:                smoothie
-version:             0.4.1
+version:             0.4.2
 synopsis:            Smooth curves via several interpolation modes
 description:         This package exports several splines you can use
                      to interpolate points in between. It includes instances for
@@ -23,6 +23,7 @@ 
   default-extensions:  DeriveFoldable
                      , DeriveFunctor
+                     , DeriveGeneric
                      , DeriveTraversable
                      , FlexibleContexts
                      , FlexibleInstances
@@ -37,7 +38,7 @@   build-depends:       base   >= 4.7  && < 5.0
                      , linear >= 1.16 && < 1.21
                      , vector >= 0.10 && < 0.12
-                     , aeson  >= 0.8  && < 0.10
+                     , aeson  >= 0.8  && < 0.11
                      , text   >= 1.2  && < 1.3
 
   hs-source-dirs:      src
src/Data/Spline/Curve.hs view
@@ -32,6 +32,7 @@ import Data.Spline.Key import Data.Vector ( Vector, (!?), fromList ) import Linear ( Additive )+import GHC.Generics ( Generic )  -- |A @'Spline' a s@ is a collection of 'Key's with associated interpolation -- modes.@@ -44,7 +45,7 @@ newtype Spline a s = Spline {     -- |Extract the 'Key's.     splineKeys :: Vector (Key (a s))-  } deriving (Eq,Functor,Show)+  } deriving (Eq,Generic,Functor,Show)  instance (FromJSON (a s), Ord s) => FromJSON ((a s -> s) -> Spline a s) where   parseJSON value = do@@ -52,7 +53,8 @@     pure $ \sampler -> spline sampler keys  instance (ToJSON (a s)) => ToJSON (Spline a s) where-  toJSON = Array . fmap toJSON . splineKeys+  toJSON     = genericToJSON defaultOptions+  toEncoding = genericToEncoding defaultOptions  -- |Build a @'Spline' a s@. --