{"action":"created","issue":{"url":"https://api.github.com/repos/reflex-frp/reflex-dom-contrib/issues/55","repository_url":"https://api.github.com/repos/reflex-frp/reflex-dom-contrib","labels_url":"https://api.github.com/repos/reflex-frp/reflex-dom-contrib/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/reflex-frp/reflex-dom-contrib/issues/55/comments","events_url":"https://api.github.com/repos/reflex-frp/reflex-dom-contrib/issues/55/events","html_url":"https://github.com/reflex-frp/reflex-dom-contrib/issues/55","id":366367880,"node_id":"MDU6SXNzdWUzNjYzNjc4ODA=","number":55,"title":"Using MonadRouted","user":{"login":"billrockx","id":43818349,"node_id":"MDQ6VXNlcjQzODE4MzQ5","avatar_url":"https://avatars2.githubusercontent.com/u/43818349?v=4","gravatar_id":"","url":"https://api.github.com/users/billrockx","html_url":"https://github.com/billrockx","followers_url":"https://api.github.com/users/billrockx/followers","following_url":"https://api.github.com/users/billrockx/following{/other_user}","gists_url":"https://api.github.com/users/billrockx/gists{/gist_id}","starred_url":"https://api.github.com/users/billrockx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billrockx/subscriptions","organizations_url":"https://api.github.com/users/billrockx/orgs","repos_url":"https://api.github.com/users/billrockx/repos","events_url":"https://api.github.com/users/billrockx/events{/privacy}","received_events_url":"https://api.github.com/users/billrockx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-03T14:28:05Z","updated_at":"2018-10-12T15:03:39Z","closed_at":null,"author_association":"NONE","body":"How to use `routeApp` to add routing to my webpage.\r\n```\r\ntestApp :: MonadWidget t m => m ()\r\ntestApp = do\r\n  routeApp \"app\" $ do\r\n    withPathSegment go\r\n  pure ()\r\n  where\r\n    go ::  (MonadWidget t m, MonadRouted t m) => Dynamic t (Maybe PathSegment) -> m ()\r\n    go dPathSeg = do\r\n      (dyn . ffor dPathSeg) $ \\ps -> do\r\n        case maybe \"a\" id ps of\r\n          \"a\" -> do\r\n            evt <- button \"switch to View B\"\r\n            redirectInternal $ (\"b\" <$ evt)\r\n            text \"View A\"\r\n          \"b\" -> do\r\n            evt <- button \"switch to View A\"\r\n            redirectInternal $ (\"a\" <$ evt)\r\n            text \"View B\"\r\n      pure ()\r\n\r\n```\r\nI get this error while running the code:\r\n```\r\nCould not deduce (NotReady t (RouteT t m))\r\n        arising from a use of ‘go’\r\n      from the context: MonadWidget t m\r\n        bound by the type signature for:\r\n                   testApp :: MonadWidget t m => m ()\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/reflex-frp/reflex-dom-contrib/issues/comments/429356956","html_url":"https://github.com/reflex-frp/reflex-dom-contrib/issues/55#issuecomment-429356956","issue_url":"https://api.github.com/repos/reflex-frp/reflex-dom-contrib/issues/55","id":429356956,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTM1Njk1Ng==","user":{"login":"mightybyte","id":9451,"node_id":"MDQ6VXNlcjk0NTE=","avatar_url":"https://avatars2.githubusercontent.com/u/9451?v=4","gravatar_id":"","url":"https://api.github.com/users/mightybyte","html_url":"https://github.com/mightybyte","followers_url":"https://api.github.com/users/mightybyte/followers","following_url":"https://api.github.com/users/mightybyte/following{/other_user}","gists_url":"https://api.github.com/users/mightybyte/gists{/gist_id}","starred_url":"https://api.github.com/users/mightybyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mightybyte/subscriptions","organizations_url":"https://api.github.com/users/mightybyte/orgs","repos_url":"https://api.github.com/users/mightybyte/repos","events_url":"https://api.github.com/users/mightybyte/events{/privacy}","received_events_url":"https://api.github.com/users/mightybyte/received_events","type":"User","site_admin":false},"created_at":"2018-10-12T15:03:39Z","updated_at":"2018-10-12T15:03:39Z","author_association":"MEMBER","body":"Ahh, it looks like we need to provide an instance for the new `NotReady` type class in `reflex` (https://github.com/reflex-frp/reflex/blob/develop/src/Reflex/NotReady/Class.hs).\r\n\r\nHowever, Obsidian has a new router system they've been working on as a part of Obelisk.  The source is here:\r\n\r\nhttps://github.com/obsidiansystems/obelisk/blob/master/lib/route/src/Obelisk/Route.hs\r\n\r\nAnd here is an example of how reflex-frp.org uses it:\r\n\r\nhttps://github.com/reflex-frp/reflex-frp.org/blob/master/common/src/Common/Route.hs\r\n\r\nMonadRouted was thrown together pretty quickly to get something usable.  The new obelisk routing infrastructure is much more carefully thought out, so I would recommend switching to that."}}
{"actor":{"display_login":"mightybyte"}}