on develop help sign in
Docs for `newEventWithTrigger`. Addresses #3
commit832580fe353a920337cdf2545d85da97df4e87bc authorSchell Scivally <efsubenovex@gmail.com> dateFri 10 Apr 2015, 09:30 (12 years ago) parent9ed658b
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/s/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