{"action":"created","issue":{"url":"https://api.github.com/repos/ivanperez-keera/Yampa/issues/16","labels_url":"https://api.github.com/repos/ivanperez-keera/Yampa/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/ivanperez-keera/Yampa/issues/16/comments","events_url":"https://api.github.com/repos/ivanperez-keera/Yampa/issues/16/events","html_url":"https://github.com/ivanperez-keera/Yampa/issues/16","id":111266436,"number":16,"title":"reactimate's type requirements seem contrived","user":{"login":"rlupton20","id":13752145,"avatar_url":"https://avatars.githubusercontent.com/u/13752145?v=3","gravatar_id":"","url":"https://api.github.com/users/rlupton20","html_url":"https://github.com/rlupton20","followers_url":"https://api.github.com/users/rlupton20/followers","following_url":"https://api.github.com/users/rlupton20/following{/other_user}","gists_url":"https://api.github.com/users/rlupton20/gists{/gist_id}","starred_url":"https://api.github.com/users/rlupton20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlupton20/subscriptions","organizations_url":"https://api.github.com/users/rlupton20/orgs","repos_url":"https://api.github.com/users/rlupton20/repos","events_url":"https://api.github.com/users/rlupton20/events{/privacy}","received_events_url":"https://api.github.com/users/rlupton20/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-13T20:42:09Z","updated_at":"2015-10-14T01:39:20Z","closed_at":null,"body":"`reactimate` seems to have some redundancy in its type requirements, more specifically, the two Bool inputs required for the input and output actions.\r\n\r\nIs there a good reason to not introduce some wrapped functions which simplify this? For instance, I wrote a small module, which I've uploaded [in this gist](https://gist.github.com/rlupton20/0274a7eab045f248ee1d) (please forgive my naming), which I find I use rather than `reactimate` directly.\r\n\r\n(With regards to issue #15, `sReactimate` generalises to all monads with no changes, and `yampaMain` ~~should be~~ is fairly straightforward to adjust for `MonadIO` actions.)"},"comment":{"url":"https://api.github.com/repos/ivanperez-keera/Yampa/issues/comments/147900315","html_url":"https://github.com/ivanperez-keera/Yampa/issues/16#issuecomment-147900315","issue_url":"https://api.github.com/repos/ivanperez-keera/Yampa/issues/16","id":147900315,"user":{"login":"ivanperez-keera","id":1162320,"avatar_url":"https://avatars.githubusercontent.com/u/1162320?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanperez-keera","html_url":"https://github.com/ivanperez-keera","followers_url":"https://api.github.com/users/ivanperez-keera/followers","following_url":"https://api.github.com/users/ivanperez-keera/following{/other_user}","gists_url":"https://api.github.com/users/ivanperez-keera/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanperez-keera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanperez-keera/subscriptions","organizations_url":"https://api.github.com/users/ivanperez-keera/orgs","repos_url":"https://api.github.com/users/ivanperez-keera/repos","events_url":"https://api.github.com/users/ivanperez-keera/events{/privacy}","received_events_url":"https://api.github.com/users/ivanperez-keera/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T01:39:20Z","updated_at":"2015-10-14T01:39:20Z","body":"I agree that the signature is overly complex. I tend to think of reactimate as:\r\n\r\n``` haskell\r\nreactimate :: (IO a, IO (DTime, a)) -> (b -> IO Bool) -> SF a b -> IO ()\r\n```\r\n\r\nI'll discuss the change with Henrik and get back to you.\r\n\r\nRegarding the way that you are structuring your code: we are experimenting with two new additions; you might want to keep an eye open for these two babies:\r\n\r\n* One is **signals and sinks** (https://github.com/ivanperez-keera/Yampa/blob/signalsink/src/FRP/Yampa/Signal.hs). It can be separated completely from Yampa, there is no need to make them first-class citizens in the FRP dimension.\r\n\r\n They can be made applicative functors, combined and mixed, etc. That gives a nice, modular way of structuring inputs and outputs.  They also pave the way to communicate different reactive and FRP libraries, such as https://github.com/keera-studios/keera-hails, which would become `sources` in this vocabulary.\r\n\r\n For instance, I have an SDL clock `signal` defined in a separate library, and I often pair it with a game input `source` to obtain a game input `signal`.\r\n\r\n* The second addition are **local clocks**. We (Manuel Barenz and me) have been exploring adding clocks to SFs. It is being kept in a separate branch for now. We have experimented with *downsampling* and *upsampling*, *busy* clocks, *constant FPS* clocks, etc. A dependently-typed language would be best to express this, but we've done it in haskell as an extension of Yampa for now."}}