packages feed

Yampa 0.14.8 → 0.14.9

raw patch · 4 files changed

+18/−15 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG view
@@ -1,3 +1,10 @@+2024-06-08 Ivan Perez <ivan.perez@keera.co.uk>+    * Version bump (0.14.9) (#299).+    * Document FRP.Yampa.Random.streamToSF (#296).+    * Document FRP.Yampa.Switches.safeZip (#297).+    * Simplify FRP.Yampa.Switches.safeZip (#298).+    * Fix date in CHANGELOG (#300).+ 2024-04-07 Ivan Perez <ivan.perez@keera.co.uk>     * Version bump (0.14.8) (#294). 
Yampa.cabal view
@@ -30,7 +30,7 @@ build-type:    Simple  name:          Yampa-version:       0.14.8+version:       0.14.9 author:        Henrik Nilsson, Antony Courtney maintainer:    Ivan Perez (ivan.perez@keera.co.uk) homepage:      https://github.com/ivanperez-keera/Yampa/
src/FRP/Yampa/Random.hs view
@@ -45,6 +45,8 @@ noiseR :: (RandomGen g, Random b) => (b, b) -> g -> SF a b noiseR range g0 = streamToSF (randomRs range g0) +-- | Turn an infinite list of elements into an SF producing those elements. The+-- SF ignores its input. streamToSF :: [b] -> SF a b streamToSF []     = intErr "Yampa" "streamToSF" "Empty list!" streamToSF (b:bs) = SF {sfTF = tf0}
src/FRP/Yampa/Switches.hs view
@@ -681,23 +681,17 @@ drpSwitchZ :: [SF a b] -> SF ([a], Event ([SF a b] -> [SF a b])) [b] drpSwitchZ = drpSwitch (safeZip "drpSwitchZ") +-- | Zip two lists.+--+-- PRE: The first list is not shorter than the second. safeZip :: String -> [a] -> [b] -> [(a, b)]-safeZip fn l1 l2 = safeZip' l1 l2+safeZip fn = safeZip'   where     safeZip' :: [a] -> [b] -> [(a, b)]-    safeZip' _  []     = []-    safeZip' as (b:bs) = (head' as, b) : safeZip' (tail' as) bs--    head' :: [a] -> a-    head' []    = err-    head' (a:_) = a--    tail' :: [a] -> [a]-    tail' []     = err-    tail' (_:as) = as--    err :: a-    err = usrErr "FRP.Yampa.Switches" fn "Input list too short."+    safeZip' _      []     = []+    safeZip' (a:as) (b:bs) = (a, b) : safeZip' as bs+    safeZip' _      _      =+      usrErr "FRP.Yampa.Switches" fn "Input list too short."  -- Freezes a "running" signal function, i.e., turns it into a continuation in -- the form of a plain signal function.