Merge branch 'schell-master' into develop

This commit is contained in:
Ryan Trinkle 2015-04-30 18:40:40 -04:00
commit 6ed20dc59a
2 changed files with 18 additions and 0 deletions

11
README.md Normal file
View File

@ -0,0 +1,11 @@
Reflex
======
Practical Functional Reactive Programming
Resources
---------
[try reflex](https://github.com/ryantrinkle/try-reflex)
[reddit/r/reflexfrp](http://www.reddit.com/r/reflexfrp)
irc.freenode.net #reflex-frp

View File

@ -19,6 +19,13 @@ class (ReflexHost t, Monad m) => MonadReadEvent t m | m -> t where
readEvent :: EventHandle t a -> m (Maybe (m a))
class (Monad m, ReflexHost t) => MonadReflexCreateTrigger t m | m -> t where
-- | Creates an original Event (one that is not based on any other event).
-- When a subscriber first subscribes to an event (building another event
-- that depends on the subscription) the given callback function is run by
-- passing a trigger. The event is then set up in IO. The callback
-- function returns an accompanying teardown action.
-- Any time between setup and teardown the trigger can be used to fire
-- the event.
newEventWithTrigger :: (EventTrigger t a -> IO (IO ())) -> m (Event t a)
class (Monad m, ReflexHost t, MonadReflexCreateTrigger t m) => MonadReflexHost t m | m -> t where