summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuhaPaananen <>2012-03-01 22:06:05 (GMT)
committerhdiff <hdiff@luite.com>2012-03-01 22:06:05 (GMT)
commit2b3ac9e6298dd353eb4f9f453ca4c8b81111a996 (patch)
treecbfca310e0b924166980a0998525a66ae4a0c54c
parente5552facdfb881760dfac75840c3b3dd503bf601 (diff)
version 0.30.3
-rw-r--r--reactive-bacon.cabal2
-rw-r--r--src/Reactive/Bacon/EventStream.hs3
2 files changed, 4 insertions, 1 deletions
diff --git a/reactive-bacon.cabal b/reactive-bacon.cabal
index 35a33a6..559f8f1 100644
--- a/reactive-bacon.cabal
+++ b/reactive-bacon.cabal
@@ -1,5 +1,5 @@
Name: reactive-bacon
-Version: 0.2
+Version: 0.3
Stability: experimental
Synopsis: FRP (functional reactive programming) framework
Description: FRP (functional reactive programming) framework inspired by RX, reactive-banana and Iteratee
diff --git a/src/Reactive/Bacon/EventStream.hs b/src/Reactive/Bacon/EventStream.hs
index 2a25dc9..3ecac72 100644
--- a/src/Reactive/Bacon/EventStream.hs
+++ b/src/Reactive/Bacon/EventStream.hs
@@ -14,6 +14,9 @@ instance Functor EventStream where
mapE :: EventSource s => (a -> b) -> s a -> IO (EventStream b)
mapE f = return . (fmap f) . obs
+voidE :: EventSource s => s a -> IO (EventStream ())
+voidE = mapE (const ())
+
scanE :: EventSource s => (b -> a -> b) -> b -> s a -> IO (EventStream b)
scanE f seed src = do acc <- newTVarIO seed
wrap $ sinkMap (scanSink acc) src