reactive-banana-automation 0.5.4 → 0.5.5
raw patch · 3 files changed
+15/−4 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Reactive.Banana.Automation: liftMomentIO :: MomentIO a -> Automation sensors actuators a
Files
- CHANGELOG +6/−0
- Reactive/Banana/Automation.hs +8/−3
- reactive-banana-automation.cabal +1/−1
CHANGELOG view
@@ -1,3 +1,9 @@+reactive-banana-automation (0.5.5) upstream; urgency=medium++ * Added liftMomemntIO.++ -- Joey Hess <id@joeyh.name> Thu, 21 Oct 2021 01:36:57 -0400+ reactive-banana-automation (0.5.4) upstream; urgency=medium * Allow building with time-1.9, needed for ghc 8.8.3.
Reactive/Banana/Automation.hs view
@@ -20,6 +20,7 @@ Automation, runAutomation, observeAutomation,+ liftMomentIO, -- * Events EventSource, newEventSource,@@ -124,8 +125,12 @@ -- | All of "Reactive.Banana.Combinators" can be used with this monad. instance MonadMoment (Automation sensors actuators) where- liftMoment = Automation . lift . liftMoment+ liftMoment = liftMomentIO . liftMoment +-- | Allows "Reactive.Banana.Framework" to be used with this monad.+liftMomentIO :: MomentIO a -> Automation sensors actuators a+liftMomentIO = Automation . lift+ setupAutomation :: Automation sensors actuators () -> IO sensors -> (actuators -> IO ()) -> IO sensors setupAutomation automation mksensors actuators = do sensors <- mksensors@@ -252,11 +257,11 @@ -- | `stepper` lifted into `Automation` automationStepper :: a -> Event a -> Automation sensors actuators (Behavior a)-automationStepper a e = Automation $ lift $ stepper a e+automationStepper a e = liftMomentIO $ stepper a e -- | `changes` lifted into `Automation` automationChanges :: Behavior a -> Automation sensors actuators (Event (Future a))-automationChanges = Automation . lift . changes+automationChanges = liftMomentIO . changes -- | Call when a sensor has sensed a value. --
reactive-banana-automation.cabal view
@@ -1,5 +1,5 @@ Name: reactive-banana-automation-Version: 0.5.4+Version: 0.5.5 Cabal-Version: >= 1.10 License: AGPL-3 Maintainer: Joey Hess <id@joeyh.name>