{"action":"created","comment":{"url":"https://api.github.com/repos/joshvera/effects/pulls/comments/197501919","pull_request_review_id":131264341,"id":197501919,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzUwMTkxOQ==","diff_hunk":"@@ -1,17 +1,17 @@\n {-# LANGUAGE GADTs #-}\n {-# LANGUAGE FlexibleContexts #-}\n {-# LANGUAGE TypeOperators #-}\n-{-# LANGUAGE DataKinds #-}\n+{-# LANGUAGE DataKinds, KindSignatures #-}\n module Teletype where\n \n import Control.Monad.Effect\n import Control.Monad.Effect.Internal as I\n import System.Exit hiding (ExitSuccess)\n \n-data Teletype s where\n-  PutStrLn    :: String -> Teletype ()\n-  GetLine     :: Teletype String\n-  ExitSuccess :: Teletype ()\n+data Teletype (m :: * -> *) s where","path":"examples/src/Teletype.hs","position":16,"original_position":16,"commit_id":"144f1f26228b1e7e98d3606a10d41273b271a544","original_commit_id":"144f1f26228b1e7e98d3606a10d41273b271a544","user":{"login":"robrix","id":59671,"node_id":"MDQ6VXNlcjU5Njcx","avatar_url":"https://avatars0.githubusercontent.com/u/59671?v=4","gravatar_id":"","url":"https://api.github.com/users/robrix","html_url":"https://github.com/robrix","followers_url":"https://api.github.com/users/robrix/followers","following_url":"https://api.github.com/users/robrix/following{/other_user}","gists_url":"https://api.github.com/users/robrix/gists{/gist_id}","starred_url":"https://api.github.com/users/robrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robrix/subscriptions","organizations_url":"https://api.github.com/users/robrix/orgs","repos_url":"https://api.github.com/users/robrix/repos","events_url":"https://api.github.com/users/robrix/events{/privacy}","received_events_url":"https://api.github.com/users/robrix/received_events","type":"User","site_admin":true},"body":"All effects now receive this extra parameter, populated with an `Eff`, whose effect list gets smaller and smaller as other effects are handled.","created_at":"2018-06-22T16:36:54Z","updated_at":"2018-06-22T17:01:31Z","html_url":"https://github.com/joshvera/effects/pull/53#discussion_r197501919","pull_request_url":"https://api.github.com/repos/joshvera/effects/pulls/53","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/joshvera/effects/pulls/comments/197501919"},"html":{"href":"https://github.com/joshvera/effects/pull/53#discussion_r197501919"},"pull_request":{"href":"https://api.github.com/repos/joshvera/effects/pulls/53"}}},"pull_request":{"url":"https://api.github.com/repos/joshvera/effects/pulls/53","id":193497624,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzNDk3NjI0","html_url":"https://github.com/joshvera/effects/pull/53","diff_url":"https://github.com/joshvera/effects/pull/53.diff","patch_url":"https://github.com/joshvera/effects/pull/53.patch","issue_url":"https://api.github.com/repos/joshvera/effects/issues/53","number":53,"state":"open","locked":false,"title":"[WIP] Higher-order effects","user":{"login":"robrix","id":59671,"node_id":"MDQ6VXNlcjU5Njcx","avatar_url":"https://avatars0.githubusercontent.com/u/59671?v=4","gravatar_id":"","url":"https://api.github.com/users/robrix","html_url":"https://github.com/robrix","followers_url":"https://api.github.com/users/robrix/followers","following_url":"https://api.github.com/users/robrix/following{/other_user}","gists_url":"https://api.github.com/users/robrix/gists{/gist_id}","starred_url":"https://api.github.com/users/robrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robrix/subscriptions","organizations_url":"https://api.github.com/users/robrix/orgs","repos_url":"https://api.github.com/users/robrix/repos","events_url":"https://api.github.com/users/robrix/events{/privacy}","received_events_url":"https://api.github.com/users/robrix/received_events","type":"User","site_admin":true},"body":"This PR:\r\n\r\n- [x] Redefines effects using higher-order syntax à la _Effect Handlers in Scope_.\r\n- [x] Replaces the handler functions with pattern synonyms for writing effect handlers.\r\n- [x] ~~Replaces interposition with _scoped effects_.~~ Scoped effects are good, but interposition typechecks just fine as-is.\r\n- [x] Define an `Effect` instance for `Resumable`.\r\n- [x] ~~Assume `Effect` instances in the `E` constructor so we can avoid having to add constraints everywhere.~~ This doesn’t work out.\r\n- [x] ~~Can we define the pattern synonyms against `Effectful` instead of `Eff`?~~ No:\r\n    ```\r\n    ghc: panic! (the 'impossible' happened)\r\n      (GHC version 8.2.2 for x86_64-apple-darwin):\r\n    \tmkOneConFull: Not TyConApp:\r\n      a_abvsh (Eff (a_abvsh : effects_abtE6)) b_dbvv3\r\n      Call stack:\r\n          CallStack (from HasCallStack):\r\n            prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable\r\n            callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable\r\n            pprPanic, called at compiler/deSugar/Check.hs:976:30 in ghc:Check\r\n    ```\r\n- [x] Can we return `Eff` or `Effectful` from `handle` & `handleState` and 🔥 `fromRequest`?\r\n- [x] Can we make `handle` & `handleState` take explicit continuations and provide same in `Other`?\r\n  - [x] ~~Can we then 🔥 `Request`?~~ Not really, we kind of need it for `handleState`.\r\n- [x] ~~Can we define `relay`/`relayState` again?~~ Not as far as I can see, tho possibly if we limited it to specific functors. But in general, if you wanted `relay`/`relayState` before, you want to use the pattern synonyms now.\r\n- [ ] 📝 everything.\r\n- [x] Fix the tests.\r\n- [x] Figure out what to do with `Embedded`.\r\n- [x] Fixes #47.\r\n- [x] Fixes #52.\r\n","created_at":"2018-06-08T03:03:29Z","updated_at":"2018-06-22T17:01:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"463954ab12ed3eba356525e66e970db3b6bdde35","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/joshvera/effects/pulls/53/commits","review_comments_url":"https://api.github.com/repos/joshvera/effects/pulls/53/comments","review_comment_url":"https://api.github.com/repos/joshvera/effects/pulls/comments{/number}","comments_url":"https://api.github.com/repos/joshvera/effects/issues/53/comments","statuses_url":"https://api.github.com/repos/joshvera/effects/statuses/144f1f26228b1e7e98d3606a10d41273b271a544","head":{"label":"joshvera:higher-order-effects","ref":"higher-order-effects","sha":"144f1f26228b1e7e98d3606a10d41273b271a544","user":{"login":"joshvera","id":24247,"node_id":"MDQ6VXNlcjI0MjQ3","avatar_url":"https://avatars1.githubusercontent.com/u/24247?v=4","gravatar_id":"","url":"https://api.github.com/users/joshvera","html_url":"https://github.com/joshvera","followers_url":"https://api.github.com/users/joshvera/followers","following_url":"https://api.github.com/users/joshvera/following{/other_user}","gists_url":"https://api.github.com/users/joshvera/gists{/gist_id}","starred_url":"https://api.github.com/users/joshvera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshvera/subscriptions","organizations_url":"https://api.github.com/users/joshvera/orgs","repos_url":"https://api.github.com/users/joshvera/repos","events_url":"https://api.github.com/users/joshvera/events{/privacy}","received_events_url":"https://api.github.com/users/joshvera/received_events","type":"User","site_admin":true},"repo":{"id":65308608,"node_id":"MDEwOlJlcG9zaXRvcnk2NTMwODYwOA==","name":"effects","full_name":"joshvera/effects","owner":{"login":"joshvera","id":24247,"node_id":"MDQ6VXNlcjI0MjQ3","avatar_url":"https://avatars1.githubusercontent.com/u/24247?v=4","gravatar_id":"","url":"https://api.github.com/users/joshvera","html_url":"https://github.com/joshvera","followers_url":"https://api.github.com/users/joshvera/followers","following_url":"https://api.github.com/users/joshvera/following{/other_user}","gists_url":"https://api.github.com/users/joshvera/gists{/gist_id}","starred_url":"https://api.github.com/users/joshvera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshvera/subscriptions","organizations_url":"https://api.github.com/users/joshvera/orgs","repos_url":"https://api.github.com/users/joshvera/repos","events_url":"https://api.github.com/users/joshvera/events{/privacy}","received_events_url":"https://api.github.com/users/joshvera/received_events","type":"User","site_admin":true},"private":false,"html_url":"https://github.com/joshvera/effects","description":"An implementation of \"Freer Monads, More Extensible Effects\".","fork":false,"url":"https://api.github.com/repos/joshvera/effects","forks_url":"https://api.github.com/repos/joshvera/effects/forks","keys_url":"https://api.github.com/repos/joshvera/effects/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joshvera/effects/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joshvera/effects/teams","hooks_url":"https://api.github.com/repos/joshvera/effects/hooks","issue_events_url":"https://api.github.com/repos/joshvera/effects/issues/events{/number}","events_url":"https://api.github.com/repos/joshvera/effects/events","assignees_url":"https://api.github.com/repos/joshvera/effects/assignees{/user}","branches_url":"https://api.github.com/repos/joshvera/effects/branches{/branch}","tags_url":"https://api.github.com/repos/joshvera/effects/tags","blobs_url":"https://api.github.com/repos/joshvera/effects/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joshvera/effects/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joshvera/effects/git/refs{/sha}","trees_url":"https://api.github.com/repos/joshvera/effects/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joshvera/effects/statuses/{sha}","languages_url":"https://api.github.com/repos/joshvera/effects/languages","stargazers_url":"https://api.github.com/repos/joshvera/effects/stargazers","contributors_url":"https://api.github.com/repos/joshvera/effects/contributors","subscribers_url":"https://api.github.com/repos/joshvera/effects/subscribers","subscription_url":"https://api.github.com/repos/joshvera/effects/subscription","commits_url":"https://api.github.com/repos/joshvera/effects/commits{/sha}","git_commits_url":"https://api.github.com/repos/joshvera/effects/git/commits{/sha}","comments_url":"https://api.github.com/repos/joshvera/effects/comments{/number}","issue_comment_url":"https://api.github.com/repos/joshvera/effects/issues/comments{/number}","contents_url":"https://api.github.com/repos/joshvera/effects/contents/{+path}","compare_url":"https://api.github.com/repos/joshvera/effects/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joshvera/effects/merges","archive_url":"https://api.github.com/repos/joshvera/effects/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joshvera/effects/downloads","issues_url":"https://api.github.com/repos/joshvera/effects/issues{/number}","pulls_url":"https://api.github.com/repos/joshvera/effects/pulls{/number}","milestones_url":"https://api.github.com/repos/joshvera/effects/milestones{/number}","notifications_url":"https://api.github.com/repos/joshvera/effects/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joshvera/effects/labels{/name}","releases_url":"https://api.github.com/repos/joshvera/effects/releases{/id}","deployments_url":"https://api.github.com/repos/joshvera/effects/deployments","created_at":"2016-08-09T15:57:56Z","updated_at":"2018-06-15T14:36:59Z","pushed_at":"2018-06-22T16:34:36Z","git_url":"git://github.com/joshvera/effects.git","ssh_url":"git@github.com:joshvera/effects.git","clone_url":"https://github.com/joshvera/effects.git","svn_url":"https://github.com/joshvera/effects","homepage":null,"size":620,"stargazers_count":10,"watchers_count":10,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":4,"open_issues":5,"watchers":10,"default_branch":"master"}},"base":{"label":"joshvera:master","ref":"master","sha":"8181375d6386de302a8c9807dad2f096e8d490aa","user":{"login":"joshvera","id":24247,"node_id":"MDQ6VXNlcjI0MjQ3","avatar_url":"https://avatars1.githubusercontent.com/u/24247?v=4","gravatar_id":"","url":"https://api.github.com/users/joshvera","html_url":"https://github.com/joshvera","followers_url":"https://api.github.com/users/joshvera/followers","following_url":"https://api.github.com/users/joshvera/following{/other_user}","gists_url":"https://api.github.com/users/joshvera/gists{/gist_id}","starred_url":"https://api.github.com/users/joshvera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshvera/subscriptions","organizations_url":"https://api.github.com/users/joshvera/orgs","repos_url":"https://api.github.com/users/joshvera/repos","events_url":"https://api.github.com/users/joshvera/events{/privacy}","received_events_url":"https://api.github.com/users/joshvera/received_events","type":"User","site_admin":true},"repo":{"id":65308608,"node_id":"MDEwOlJlcG9zaXRvcnk2NTMwODYwOA==","name":"effects","full_name":"joshvera/effects","owner":{"login":"joshvera","id":24247,"node_id":"MDQ6VXNlcjI0MjQ3","avatar_url":"https://avatars1.githubusercontent.com/u/24247?v=4","gravatar_id":"","url":"https://api.github.com/users/joshvera","html_url":"https://github.com/joshvera","followers_url":"https://api.github.com/users/joshvera/followers","following_url":"https://api.github.com/users/joshvera/following{/other_user}","gists_url":"https://api.github.com/users/joshvera/gists{/gist_id}","starred_url":"https://api.github.com/users/joshvera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshvera/subscriptions","organizations_url":"https://api.github.com/users/joshvera/orgs","repos_url":"https://api.github.com/users/joshvera/repos","events_url":"https://api.github.com/users/joshvera/events{/privacy}","received_events_url":"https://api.github.com/users/joshvera/received_events","type":"User","site_admin":true},"private":false,"html_url":"https://github.com/joshvera/effects","description":"An implementation of \"Freer Monads, More Extensible Effects\".","fork":false,"url":"https://api.github.com/repos/joshvera/effects","forks_url":"https://api.github.com/repos/joshvera/effects/forks","keys_url":"https://api.github.com/repos/joshvera/effects/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joshvera/effects/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joshvera/effects/teams","hooks_url":"https://api.github.com/repos/joshvera/effects/hooks","issue_events_url":"https://api.github.com/repos/joshvera/effects/issues/events{/number}","events_url":"https://api.github.com/repos/joshvera/effects/events","assignees_url":"https://api.github.com/repos/joshvera/effects/assignees{/user}","branches_url":"https://api.github.com/repos/joshvera/effects/branches{/branch}","tags_url":"https://api.github.com/repos/joshvera/effects/tags","blobs_url":"https://api.github.com/repos/joshvera/effects/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joshvera/effects/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joshvera/effects/git/refs{/sha}","trees_url":"https://api.github.com/repos/joshvera/effects/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joshvera/effects/statuses/{sha}","languages_url":"https://api.github.com/repos/joshvera/effects/languages","stargazers_url":"https://api.github.com/repos/joshvera/effects/stargazers","contributors_url":"https://api.github.com/repos/joshvera/effects/contributors","subscribers_url":"https://api.github.com/repos/joshvera/effects/subscribers","subscription_url":"https://api.github.com/repos/joshvera/effects/subscription","commits_url":"https://api.github.com/repos/joshvera/effects/commits{/sha}","git_commits_url":"https://api.github.com/repos/joshvera/effects/git/commits{/sha}","comments_url":"https://api.github.com/repos/joshvera/effects/comments{/number}","issue_comment_url":"https://api.github.com/repos/joshvera/effects/issues/comments{/number}","contents_url":"https://api.github.com/repos/joshvera/effects/contents/{+path}","compare_url":"https://api.github.com/repos/joshvera/effects/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joshvera/effects/merges","archive_url":"https://api.github.com/repos/joshvera/effects/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joshvera/effects/downloads","issues_url":"https://api.github.com/repos/joshvera/effects/issues{/number}","pulls_url":"https://api.github.com/repos/joshvera/effects/pulls{/number}","milestones_url":"https://api.github.com/repos/joshvera/effects/milestones{/number}","notifications_url":"https://api.github.com/repos/joshvera/effects/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joshvera/effects/labels{/name}","releases_url":"https://api.github.com/repos/joshvera/effects/releases{/id}","deployments_url":"https://api.github.com/repos/joshvera/effects/deployments","created_at":"2016-08-09T15:57:56Z","updated_at":"2018-06-15T14:36:59Z","pushed_at":"2018-06-22T16:34:36Z","git_url":"git://github.com/joshvera/effects.git","ssh_url":"git@github.com:joshvera/effects.git","clone_url":"https://github.com/joshvera/effects.git","svn_url":"https://github.com/joshvera/effects","homepage":null,"size":620,"stargazers_count":10,"watchers_count":10,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":4,"open_issues":5,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/joshvera/effects/pulls/53"},"html":{"href":"https://github.com/joshvera/effects/pull/53"},"issue":{"href":"https://api.github.com/repos/joshvera/effects/issues/53"},"comments":{"href":"https://api.github.com/repos/joshvera/effects/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/joshvera/effects/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/joshvera/effects/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/joshvera/effects/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/joshvera/effects/statuses/144f1f26228b1e7e98d3606a10d41273b271a544"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"robrix"}}