sodium 0.10.0.2 → 0.11.0.1
raw patch · 3 files changed
+14/−6 lines, 3 filesdep ~mtl
Dependency ranges changed: mtl
Files
- examples/tests/unit-tests.hs +1/−1
- sodium.cabal +7/−3
- src/FRP/Sodium/Plain.hs +6/−2
examples/tests/unit-tests.hs view
@@ -546,5 +546,5 @@ switch1, once1, once2, cycle1, split1, split2 {-, mergeWith1, mergeWith2, mergeWith3, coalesce1-} ] -main = forever $ runTestTT tests+main = {-forever $ -} runTestTT tests
sodium.cabal view
@@ -1,5 +1,5 @@ name: sodium-version: 0.10.0.2+version: 0.11.0.1 synopsis: Sodium Reactive Programming (FRP) System description: A general purpose Reactive Programming (FRP) system. This is part of a project to@@ -51,11 +51,15 @@ * 0.10.0.1 - Fix finalizer issue that caused breakage in ghc-7.8 - thanks Luite Stegeman. . * 0.10.0.2 - Second attempt.+ .+ * 0.11.0.0 - Make 'merge' left-biased, like Reactive Banana.+ .+ * 0.11.0.1 - Thank you Samuel Gélineau. Fix regression when using in ghc-7.8: prevent keepAlive from being GC'd early license: BSD3 license-file: LICENSE author: Stephen Blackheath-maintainer: http://blacksapphire.com/antispam/+maintainer: Stephen Blackheath <sodium2.stephen@blacksapphire.com> copyright: (c) Stephen Blackheath 2012-2013 category: FRP build-type: Simple@@ -162,5 +166,5 @@ other-modules: FRP.Sodium.Plain build-depends: base >= 4.3.0.0 && < 4.8.0.0, containers >= 0.4.0.0 && < 0.6.0.0,- mtl >= 2.0.0.0 && < 2.2.0.0+ mtl >= 2.0.0.0 && < 2.3.0.0 ghc-options: -O2
src/FRP/Sodium/Plain.hs view
@@ -226,7 +226,8 @@ (l, push, nodeRef) <- ioReactive newEventImpl unlistener <- later $ do u1 <- linkedListen ea (Just nodeRef) False push- u2 <- linkedListen eb (Just nodeRef) False push+ u2 <- linkedListen eb (Just nodeRef) False $+ schedulePrioritized (Just nodeRef) . push return (u1 >> u2) addCleanup_Listen unlistener l @@ -348,7 +349,10 @@ -- | Obtain the current value of a behavior. sample :: Behavior a -> Reactive a {-# NOINLINE sample #-}-sample = ioReactive . unSample . sampleImpl+sample beh = ioReactive $ do+ let sample = sampleImpl beh+ readIORef (sampleKeepAlive sample) -- defeat optimizer on ghc-7.8+ unSample sample -- | If there's more than one firing in a single transaction, combine them into -- one using the specified combining function.