packages feed

Yampa 0.14.6 → 0.14.7

raw patch · 8 files changed

+39/−15 lines, 8 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- FRP.Yampa: class Random a
+ FRP.Yampa: class () => Random a
- FRP.Yampa: class RandomGen g
+ FRP.Yampa: class () => RandomGen g
- FRP.Yampa.Random: class Random a
+ FRP.Yampa.Random: class () => Random a
- FRP.Yampa.Random: class RandomGen g
+ FRP.Yampa.Random: class () => RandomGen g

Files

CHANGELOG view
@@ -1,3 +1,11 @@+2024-02-09 Ivan Perez <ivan.perez@keera.co.uk>+    * Version bump (0.14.7) (#289).+    * Remove postgresql repo before installation in CI script (#284).+    * Simplify definition of FRP.Yampa.Event.joinE (#285).+    * Simplify definition of FRP.Yampa.EventS.isJustEdge (#286).+    * Simplify definition of FRP.Yampa.Task.isEdge (#287).+    * Remove redundant imports from examples (#288).+ 2023-12-07 Ivan Perez <ivan.perez@keera.co.uk>     * Version bump (0.14.6) (#282).     * Document HTML + WebAssembly backend in README (#34).
Yampa.cabal view
@@ -30,7 +30,7 @@ build-type:    Simple  name:          Yampa-version:       0.14.6+version:       0.14.7 author:        Henrik Nilsson, Antony Courtney maintainer:    Ivan Perez (ivan.perez@keera.co.uk) homepage:      https://github.com/ivanperez-keera/Yampa/@@ -72,7 +72,25 @@   default:     False   manual:      True +-- WARNING: The following flag exposes Yampa's core. You should avoid using+-- this at all. The only reason to expose it is that we are using Yampa for+-- research, and many extensions require that we expose the constructors. No+-- released project should depend on this. In general, you should always+-- install Yampa with this flag disabled.+flag expose-core+  description:+    You can enable exposing some of Yampa's core constructs using+    -fexpose-core.+    .+    Enabling this is an unsupported configuration, but it may be useful if you+    are building an extension of Yampa for research and do not wish to fork+    Yampa completely.+    .+    No released project should ever depend on this.+  default: False+  manual:  True + library   exposed-modules:     FRP.Yampa@@ -95,7 +113,6 @@   other-modules:     -- Auxiliary (commonly used) types     FRP.Yampa.Diagnostics-    FRP.Yampa.InternalCore    build-depends:       base < 6@@ -116,6 +133,14 @@   if !impl(ghc >= 8.0)     build-depends:       fail == 4.9.*++  if flag(expose-core)+    exposed-modules:+      FRP.Yampa.InternalCore+  else+    other-modules:+      FRP.Yampa.InternalCore+  test-suite hlint   type:
examples/yampa-game/MainBouncingBox.hs view
@@ -1,6 +1,4 @@ {-# LANGUAGE Arrows #-}-import Data.IORef-import Debug.Trace import FRP.Yampa       as Yampa import Graphics.UI.SDL as SDL 
examples/yampa-game/MainCircleMouse.hs view
@@ -1,6 +1,5 @@ {-# LANGUAGE Arrows #-} import Data.IORef-import Debug.Trace import FRP.Yampa       as Yampa import Graphics.UI.SDL as SDL 
examples/yampa-game/MainWiimote.hs view
@@ -2,7 +2,6 @@ import Control.Monad import Data.IORef import Data.Maybe-import Debug.Trace import FRP.Yampa       as Yampa import Graphics.UI.SDL as SDL import System.CWiid
src/FRP/Yampa/Event.hs view
@@ -270,9 +270,8 @@ -- Applicative-based definition: -- joinE = liftA2 (,) joinE :: Event a -> Event b -> Event (a, b)-joinE NoEvent   _         = NoEvent-joinE _         NoEvent   = NoEvent joinE (Event l) (Event r) = Event (l, r)+joinE _         _         = NoEvent  -- | Split event carrying pairs into two events. splitE :: Event (a, b) -> (Event a, Event b)
src/FRP/Yampa/EventS.hs view
@@ -249,10 +249,8 @@ edgeJust :: SF (Maybe a) (Event a) edgeJust = edgeBy isJustEdge (Just undefined)   where-    isJustEdge Nothing  Nothing     = Nothing     isJustEdge Nothing  ma@(Just _) = ma-    isJustEdge (Just _) (Just _)    = Nothing-    isJustEdge (Just _) Nothing     = Nothing+    isJustEdge _        _           = Nothing  -- | Edge detector parameterized on the edge detection function and initial -- state, i.e., the previous input sample. The first argument to the edge
src/FRP/Yampa/Task.hs view
@@ -94,10 +94,8 @@                                           "Task terminated!"))                    &&& edgeBy isEdge (Left undefined))   where-    isEdge (Left _)  (Left _)  = Nothing-    isEdge (Left _)  (Right c) = Just c-    isEdge (Right _) (Right _) = Nothing-    isEdge (Right _) (Left _)  = Nothing+    isEdge (Left _) (Right c) = Just c+    isEdge _        _         = Nothing  -- * Functor, Applicative and Monad instance