on develop help sign in
Merge branch 'schell-master' into develop
commit6ed20dc59a1d2d8c78097460c60e6335b4e662a7 authorRyan Trinkle <ryan.trinkle@gmail.com> dateThu 30 Apr 2015, 18:40 (11 years ago) parent93c247a21ce146
2 files changed+18
README.md+11 src/Reflex/Host/Class.hs+7
README.mdnew file+11
@@ -0,0 +1,11 @@
1+Reflex
2+======
3+Practical Functional Reactive Programming
4+
5+Resources
6+---------
7+[try reflex](https://github.com/ryantrinkle/try-reflex)
8+
9+[reddit/r/reflexfrp](http://www.reddit.com/r/reflexfrp)
10+
11+irc.freenode.net #reflex-frp
src/Reflex/Host/Class.hs+7
@@ -19,6 +19,13 @@ class (ReflexHost t, Monad m) => MonadReadEvent t m | m -> t where
1919 readEvent :: EventHandle t a -> m (Maybe (m a))
2020
2121class (Monad m, ReflexHost t) => MonadReflexCreateTrigger t m | m -> t where
22+ -- | Creates an original Event (one that is not based on any other event).
23+ -- When a subscriber first subscribes to an event (building another event
24+ -- that depends on the subscription) the given callback function is run by
25+ -- passing a trigger. The event is then set up in IO. The callback
26+ -- function returns an accompanying teardown action.
27+ -- Any time between setup and teardown the trigger can be used to fire
28+ -- the event.
2229 newEventWithTrigger :: (EventTrigger t a -> IO (IO ())) -> m (Event t a)
2330
2431class (Monad m, ReflexHost t, MonadReflexCreateTrigger t m) => MonadReflexHost t m | m -> t where