mirror of
https://github.com/ilyakooo0/reflex.git
synced 2024-10-04 05:37:09 +03:00
Docs for newEventWithTrigger
. Addresses #3
This commit is contained in:
parent
9ed658b846
commit
832580fe35
11
README.md
Normal file
11
README.md
Normal file
@ -0,0 +1,11 @@
|
||||
Reflex
|
||||
======
|
||||
Practical Functional Reactive Programming
|
||||
|
||||
Resources
|
||||
---------
|
||||
[try reflex](https://github.com/ryantrinkle/try-reflex)
|
||||
|
||||
[reddit/s/reflexfrp](http://www.reddit.com/r/reflexfrp)
|
||||
|
||||
irc.freenode.net #reflex-frp
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user