packages feed

Yampa 0.13.7 → 0.14

raw patch · 4 files changed

+12/−8 lines, 4 filesdep ~simple-affine-spacePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: simple-affine-space

API changes (from Hackage documentation)

- FRP.Yampa: derivative :: VectorSpace a s => SF a a
+ FRP.Yampa: derivative :: (Fractional s, VectorSpace a s) => SF a a
- FRP.Yampa: imIntegral :: VectorSpace a s => a -> SF a a
+ FRP.Yampa: imIntegral :: (Fractional s, VectorSpace a s) => a -> SF a a
- FRP.Yampa: impulseIntegral :: VectorSpace a k => SF (a, Event a) a
+ FRP.Yampa: impulseIntegral :: (Fractional k, VectorSpace a k) => SF (a, Event a) a
- FRP.Yampa: integral :: VectorSpace a s => SF a a
+ FRP.Yampa: integral :: (Fractional s, VectorSpace a s) => SF a a
- FRP.Yampa: loopIntegral :: VectorSpace c s => SF (a, c) (b, c) -> SF a b
+ FRP.Yampa: loopIntegral :: (Fractional s, VectorSpace c s) => SF (a, c) (b, c) -> SF a b
- FRP.Yampa.Integration: derivative :: VectorSpace a s => SF a a
+ FRP.Yampa.Integration: derivative :: (Fractional s, VectorSpace a s) => SF a a
- FRP.Yampa.Integration: imIntegral :: VectorSpace a s => a -> SF a a
+ FRP.Yampa.Integration: imIntegral :: (Fractional s, VectorSpace a s) => a -> SF a a
- FRP.Yampa.Integration: impulseIntegral :: VectorSpace a k => SF (a, Event a) a
+ FRP.Yampa.Integration: impulseIntegral :: (Fractional k, VectorSpace a k) => SF (a, Event a) a
- FRP.Yampa.Integration: integral :: VectorSpace a s => SF a a
+ FRP.Yampa.Integration: integral :: (Fractional s, VectorSpace a s) => SF a a
- FRP.Yampa.Loop: loopIntegral :: VectorSpace c s => SF (a, c) (b, c) -> SF a b
+ FRP.Yampa.Loop: loopIntegral :: (Fractional s, VectorSpace c s) => SF (a, c) (b, c) -> SF a b

Files

CHANGELOG view
@@ -1,3 +1,8 @@+2022-12-07 Ivan Perez <ivan.perez@keera.co.uk>+        * Yampa.cabal: Version bump (0.14) (#242), bump version bounds of+          dependency (#241).+        * src/: Adjust to work with simple-affine-space-0.2 (#241).+ 2022-10-07 Ivan Perez <ivan.perez@keera.co.uk>         * Yampa.cabal: Version bump (0.13.7) (#238), add version bounds to           dependencies (#233).
Yampa.cabal view
@@ -30,7 +30,7 @@ build-type:    Simple  name:          Yampa-version:       0.13.7+version:       0.14 author:        Henrik Nilsson, Antony Courtney maintainer:    Ivan Perez (ivan.perez@keera.co.uk) homepage:      https://github.com/ivanperez-keera/Yampa/@@ -72,7 +72,6 @@   default:     False   manual:      True - library   exposed-modules:     FRP.Yampa@@ -102,7 +101,7 @@      , deepseq             >= 1.3.0.1 && < 1.5     , random              >= 1.1     && < 1.3-    , simple-affine-space >= 0.1     && < 0.2+    , simple-affine-space >= 0.1     && < 0.3    default-language:     Haskell2010
src/FRP/Yampa/Integration.hs view
@@ -52,7 +52,7 @@  -- | Integration using the rectangle rule. {-# INLINE integral #-}-integral :: VectorSpace a s => SF a a+integral :: (Fractional s, VectorSpace a s) => SF a a integral = SF {sfTF = tf0}   where     tf0 a0 = (integralAux igrl0 a0, igrl0)@@ -66,7 +66,7 @@             igrl' = igrl ^+^ realToFrac dt *^ a_prev  -- | \"Immediate\" integration (using the function's value at the current time)-imIntegral :: VectorSpace a s => a -> SF a a+imIntegral :: (Fractional s, VectorSpace a s) => a -> SF a a imIntegral = ((\ _ a' dt v -> v ^+^ realToFrac dt *^ a') `iterFrom`)  -- | Integrate using an auxiliary function that takes the current and the last@@ -79,7 +79,7 @@  -- | A very crude version of a derivative. It simply divides the --   value difference by the time difference. Use at your own risk.-derivative :: VectorSpace a s => SF a a+derivative :: (Fractional s, VectorSpace a s) => SF a a derivative = SF {sfTF = tf0}   where     tf0 a0 = (derivativeAux a0, zeroVector)@@ -90,7 +90,7 @@  -- | Integrate the first input signal and add the /discrete/ accumulation (sum) --   of the second, discrete, input signal.-impulseIntegral :: VectorSpace a k => SF (a, Event a) a+impulseIntegral :: (Fractional k, VectorSpace a k) => SF (a, Event a) a impulseIntegral = (integral *** accumHoldBy (^+^) zeroVector) >>^ uncurry (^+^)  -- | Count the occurrences of input events.
src/FRP/Yampa/Loop.hs view
@@ -36,5 +36,5 @@ -- | Loop by integrating the second value in the pair and feeding the -- result back. Because the integral at time 0 is zero, this is always -- well defined.-loopIntegral :: VectorSpace c s => SF (a,c) (b,c) -> SF a b+loopIntegral :: (Fractional s, VectorSpace c s) => SF (a,c) (b,c) -> SF a b loopIntegral sf = loop (second integral >>> sf)