{"action":"created","comment":{"url":"https://api.github.com/repos/soenkehahn/operational-mocks/pulls/comments/75350231","id":75350231,"diff_hunk":"@@ -0,0 +1,94 @@\n+{-# LANGUAGE GADTs #-}\n+{-# LANGUAGE DeriveFunctor #-}\n+{-# LANGUAGE StandaloneDeriving #-}\n+{-# LANGUAGE ScopedTypeVariables #-}\n+module Control.Monad.Free.MocksSpec where\n+\n+import Control.Monad.Free\n+import Control.Exception\n+import Test.Hspec\n+import Prelude hiding (getLine)\n+\n+import Control.Monad.Free.Mocks\n+\n+-- * Functor\n+data ConsoleF a where\n+  GetLine :: (String -> a) -> ConsoleF a\n+  WriteLine :: String -> a -> ConsoleF a\n+\n+deriving instance Functor ConsoleF\n+\n+instance HasMock ConsoleF where\n+  mockExtract (GetLine f) = Right $ W f\n+  mockExtract (WriteLine _ a) = Left a\n+\n+\n+instance Show (ConsoleF a) where\n+  show (GetLine _) = \"GetLine\"\n+  show (WriteLine _ _) = \"WriteLine\"","path":"test/Control/Monad/Free/MocksSpec.hs","position":28,"original_position":28,"commit_id":"ddb8bb45a6426ee347f543376ab99aa5fd811e33","original_commit_id":"ddb8bb45a6426ee347f543376ab99aa5fd811e33","user":{"login":"soenkehahn","id":402539,"avatar_url":"https://avatars.githubusercontent.com/u/402539?v=3","gravatar_id":"","url":"https://api.github.com/users/soenkehahn","html_url":"https://github.com/soenkehahn","followers_url":"https://api.github.com/users/soenkehahn/followers","following_url":"https://api.github.com/users/soenkehahn/following{/other_user}","gists_url":"https://api.github.com/users/soenkehahn/gists{/gist_id}","starred_url":"https://api.github.com/users/soenkehahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soenkehahn/subscriptions","organizations_url":"https://api.github.com/users/soenkehahn/orgs","repos_url":"https://api.github.com/users/soenkehahn/repos","events_url":"https://api.github.com/users/soenkehahn/events{/privacy}","received_events_url":"https://api.github.com/users/soenkehahn/received_events","type":"User","site_admin":false},"body":"I'm using `ShowConstructor` for this. Since this is not a lawful `Show` instance.","created_at":"2016-08-18T17:21:24Z","updated_at":"2016-08-18T17:21:24Z","html_url":"https://github.com/soenkehahn/operational-mocks/pull/5#discussion_r75350231","pull_request_url":"https://api.github.com/repos/soenkehahn/operational-mocks/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/soenkehahn/operational-mocks/pulls/comments/75350231"},"html":{"href":"https://github.com/soenkehahn/operational-mocks/pull/5#discussion_r75350231"},"pull_request":{"href":"https://api.github.com/repos/soenkehahn/operational-mocks/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/soenkehahn/operational-mocks/pulls/5","id":80365934,"html_url":"https://github.com/soenkehahn/operational-mocks/pull/5","diff_url":"https://github.com/soenkehahn/operational-mocks/pull/5.diff","patch_url":"https://github.com/soenkehahn/operational-mocks/pull/5.patch","issue_url":"https://api.github.com/repos/soenkehahn/operational-mocks/issues/5","number":5,"state":"open","locked":false,"title":"WIP - Support mocking Free Monad","user":{"login":"amarpotghan","id":1610539,"avatar_url":"https://avatars.githubusercontent.com/u/1610539?v=3","gravatar_id":"","url":"https://api.github.com/users/amarpotghan","html_url":"https://github.com/amarpotghan","followers_url":"https://api.github.com/users/amarpotghan/followers","following_url":"https://api.github.com/users/amarpotghan/following{/other_user}","gists_url":"https://api.github.com/users/amarpotghan/gists{/gist_id}","starred_url":"https://api.github.com/users/amarpotghan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amarpotghan/subscriptions","organizations_url":"https://api.github.com/users/amarpotghan/orgs","repos_url":"https://api.github.com/users/amarpotghan/repos","events_url":"https://api.github.com/users/amarpotghan/events{/privacy}","received_events_url":"https://api.github.com/users/amarpotghan/received_events","type":"User","site_admin":false},"body":"@soenkehahn Please review.\r\n\r\nStill work in progress, things remaining:\r\n\r\n1. Fork support\r\n2. Final value check\r\n3. There is an `unsafeCoerce` lying around, could gotten rid of.","created_at":"2016-08-07T12:33:19Z","updated_at":"2016-08-18T17:21:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"67dd3336bd7c498532a9c50a3b429901557c764a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/soenkehahn/operational-mocks/pulls/5/commits","review_comments_url":"https://api.github.com/repos/soenkehahn/operational-mocks/pulls/5/comments","review_comment_url":"https://api.github.com/repos/soenkehahn/operational-mocks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/soenkehahn/operational-mocks/issues/5/comments","statuses_url":"https://api.github.com/repos/soenkehahn/operational-mocks/statuses/ddb8bb45a6426ee347f543376ab99aa5fd811e33","head":{"label":"soenkehahn:wip-free","ref":"wip-free","sha":"ddb8bb45a6426ee347f543376ab99aa5fd811e33","user":{"login":"soenkehahn","id":402539,"avatar_url":"https://avatars.githubusercontent.com/u/402539?v=3","gravatar_id":"","url":"https://api.github.com/users/soenkehahn","html_url":"https://github.com/soenkehahn","followers_url":"https://api.github.com/users/soenkehahn/followers","following_url":"https://api.github.com/users/soenkehahn/following{/other_user}","gists_url":"https://api.github.com/users/soenkehahn/gists{/gist_id}","starred_url":"https://api.github.com/users/soenkehahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soenkehahn/subscriptions","organizations_url":"https://api.github.com/users/soenkehahn/orgs","repos_url":"https://api.github.com/users/soenkehahn/repos","events_url":"https://api.github.com/users/soenkehahn/events{/privacy}","received_events_url":"https://api.github.com/users/soenkehahn/received_events","type":"User","site_admin":false},"repo":{"id":62572245,"name":"operational-mocks","full_name":"soenkehahn/operational-mocks","owner":{"login":"soenkehahn","id":402539,"avatar_url":"https://avatars.githubusercontent.com/u/402539?v=3","gravatar_id":"","url":"https://api.github.com/users/soenkehahn","html_url":"https://github.com/soenkehahn","followers_url":"https://api.github.com/users/soenkehahn/followers","following_url":"https://api.github.com/users/soenkehahn/following{/other_user}","gists_url":"https://api.github.com/users/soenkehahn/gists{/gist_id}","starred_url":"https://api.github.com/users/soenkehahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soenkehahn/subscriptions","organizations_url":"https://api.github.com/users/soenkehahn/orgs","repos_url":"https://api.github.com/users/soenkehahn/repos","events_url":"https://api.github.com/users/soenkehahn/events{/privacy}","received_events_url":"https://api.github.com/users/soenkehahn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/soenkehahn/operational-mocks","description":null,"fork":false,"url":"https://api.github.com/repos/soenkehahn/operational-mocks","forks_url":"https://api.github.com/repos/soenkehahn/operational-mocks/forks","keys_url":"https://api.github.com/repos/soenkehahn/operational-mocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/soenkehahn/operational-mocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/soenkehahn/operational-mocks/teams","hooks_url":"https://api.github.com/repos/soenkehahn/operational-mocks/hooks","issue_events_url":"https://api.github.com/repos/soenkehahn/operational-mocks/issues/events{/number}","events_url":"https://api.github.com/repos/soenkehahn/operational-mocks/events","assignees_url":"https://api.github.com/repos/soenkehahn/operational-mocks/assignees{/user}","branches_url":"https://api.github.com/repos/soenkehahn/operational-mocks/branches{/branch}","tags_url":"https://api.github.com/repos/soenkehahn/operational-mocks/tags","blobs_url":"https://api.github.com/repos/soenkehahn/operational-mocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/soenkehahn/operational-mocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/soenkehahn/operational-mocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/soenkehahn/operational-mocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/soenkehahn/operational-mocks/statuses/{sha}","languages_url":"https://api.github.com/repos/soenkehahn/operational-mocks/languages","stargazers_url":"https://api.github.com/repos/soenkehahn/operational-mocks/stargazers","contributors_url":"https://api.github.com/repos/soenkehahn/operational-mocks/contributors","subscribers_url":"https://api.github.com/repos/soenkehahn/operational-mocks/subscribers","subscription_url":"https://api.github.com/repos/soenkehahn/operational-mocks/subscription","commits_url":"https://api.github.com/repos/soenkehahn/operational-mocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/soenkehahn/operational-mocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/soenkehahn/operational-mocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/soenkehahn/operational-mocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/soenkehahn/operational-mocks/contents/{+path}","compare_url":"https://api.github.com/repos/soenkehahn/operational-mocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/soenkehahn/operational-mocks/merges","archive_url":"https://api.github.com/repos/soenkehahn/operational-mocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/soenkehahn/operational-mocks/downloads","issues_url":"https://api.github.com/repos/soenkehahn/operational-mocks/issues{/number}","pulls_url":"https://api.github.com/repos/soenkehahn/operational-mocks/pulls{/number}","milestones_url":"https://api.github.com/repos/soenkehahn/operational-mocks/milestones{/number}","notifications_url":"https://api.github.com/repos/soenkehahn/operational-mocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/soenkehahn/operational-mocks/labels{/name}","releases_url":"https://api.github.com/repos/soenkehahn/operational-mocks/releases{/id}","deployments_url":"https://api.github.com/repos/soenkehahn/operational-mocks/deployments","created_at":"2016-07-04T15:33:24Z","updated_at":"2016-07-13T00:56:18Z","pushed_at":"2016-08-08T03:52:27Z","git_url":"git://github.com/soenkehahn/operational-mocks.git","ssh_url":"git@github.com:soenkehahn/operational-mocks.git","clone_url":"https://github.com/soenkehahn/operational-mocks.git","svn_url":"https://github.com/soenkehahn/operational-mocks","homepage":null,"size":27,"stargazers_count":2,"watchers_count":2,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"soenkehahn:master","ref":"master","sha":"42af1b2ff6f054496d98aea02ef87e4bf4c45fd6","user":{"login":"soenkehahn","id":402539,"avatar_url":"https://avatars.githubusercontent.com/u/402539?v=3","gravatar_id":"","url":"https://api.github.com/users/soenkehahn","html_url":"https://github.com/soenkehahn","followers_url":"https://api.github.com/users/soenkehahn/followers","following_url":"https://api.github.com/users/soenkehahn/following{/other_user}","gists_url":"https://api.github.com/users/soenkehahn/gists{/gist_id}","starred_url":"https://api.github.com/users/soenkehahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soenkehahn/subscriptions","organizations_url":"https://api.github.com/users/soenkehahn/orgs","repos_url":"https://api.github.com/users/soenkehahn/repos","events_url":"https://api.github.com/users/soenkehahn/events{/privacy}","received_events_url":"https://api.github.com/users/soenkehahn/received_events","type":"User","site_admin":false},"repo":{"id":62572245,"name":"operational-mocks","full_name":"soenkehahn/operational-mocks","owner":{"login":"soenkehahn","id":402539,"avatar_url":"https://avatars.githubusercontent.com/u/402539?v=3","gravatar_id":"","url":"https://api.github.com/users/soenkehahn","html_url":"https://github.com/soenkehahn","followers_url":"https://api.github.com/users/soenkehahn/followers","following_url":"https://api.github.com/users/soenkehahn/following{/other_user}","gists_url":"https://api.github.com/users/soenkehahn/gists{/gist_id}","starred_url":"https://api.github.com/users/soenkehahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soenkehahn/subscriptions","organizations_url":"https://api.github.com/users/soenkehahn/orgs","repos_url":"https://api.github.com/users/soenkehahn/repos","events_url":"https://api.github.com/users/soenkehahn/events{/privacy}","received_events_url":"https://api.github.com/users/soenkehahn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/soenkehahn/operational-mocks","description":null,"fork":false,"url":"https://api.github.com/repos/soenkehahn/operational-mocks","forks_url":"https://api.github.com/repos/soenkehahn/operational-mocks/forks","keys_url":"https://api.github.com/repos/soenkehahn/operational-mocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/soenkehahn/operational-mocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/soenkehahn/operational-mocks/teams","hooks_url":"https://api.github.com/repos/soenkehahn/operational-mocks/hooks","issue_events_url":"https://api.github.com/repos/soenkehahn/operational-mocks/issues/events{/number}","events_url":"https://api.github.com/repos/soenkehahn/operational-mocks/events","assignees_url":"https://api.github.com/repos/soenkehahn/operational-mocks/assignees{/user}","branches_url":"https://api.github.com/repos/soenkehahn/operational-mocks/branches{/branch}","tags_url":"https://api.github.com/repos/soenkehahn/operational-mocks/tags","blobs_url":"https://api.github.com/repos/soenkehahn/operational-mocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/soenkehahn/operational-mocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/soenkehahn/operational-mocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/soenkehahn/operational-mocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/soenkehahn/operational-mocks/statuses/{sha}","languages_url":"https://api.github.com/repos/soenkehahn/operational-mocks/languages","stargazers_url":"https://api.github.com/repos/soenkehahn/operational-mocks/stargazers","contributors_url":"https://api.github.com/repos/soenkehahn/operational-mocks/contributors","subscribers_url":"https://api.github.com/repos/soenkehahn/operational-mocks/subscribers","subscription_url":"https://api.github.com/repos/soenkehahn/operational-mocks/subscription","commits_url":"https://api.github.com/repos/soenkehahn/operational-mocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/soenkehahn/operational-mocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/soenkehahn/operational-mocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/soenkehahn/operational-mocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/soenkehahn/operational-mocks/contents/{+path}","compare_url":"https://api.github.com/repos/soenkehahn/operational-mocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/soenkehahn/operational-mocks/merges","archive_url":"https://api.github.com/repos/soenkehahn/operational-mocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/soenkehahn/operational-mocks/downloads","issues_url":"https://api.github.com/repos/soenkehahn/operational-mocks/issues{/number}","pulls_url":"https://api.github.com/repos/soenkehahn/operational-mocks/pulls{/number}","milestones_url":"https://api.github.com/repos/soenkehahn/operational-mocks/milestones{/number}","notifications_url":"https://api.github.com/repos/soenkehahn/operational-mocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/soenkehahn/operational-mocks/labels{/name}","releases_url":"https://api.github.com/repos/soenkehahn/operational-mocks/releases{/id}","deployments_url":"https://api.github.com/repos/soenkehahn/operational-mocks/deployments","created_at":"2016-07-04T15:33:24Z","updated_at":"2016-07-13T00:56:18Z","pushed_at":"2016-08-08T03:52:27Z","git_url":"git://github.com/soenkehahn/operational-mocks.git","ssh_url":"git@github.com:soenkehahn/operational-mocks.git","clone_url":"https://github.com/soenkehahn/operational-mocks.git","svn_url":"https://github.com/soenkehahn/operational-mocks","homepage":null,"size":27,"stargazers_count":2,"watchers_count":2,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/soenkehahn/operational-mocks/pulls/5"},"html":{"href":"https://github.com/soenkehahn/operational-mocks/pull/5"},"issue":{"href":"https://api.github.com/repos/soenkehahn/operational-mocks/issues/5"},"comments":{"href":"https://api.github.com/repos/soenkehahn/operational-mocks/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/soenkehahn/operational-mocks/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/soenkehahn/operational-mocks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/soenkehahn/operational-mocks/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/soenkehahn/operational-mocks/statuses/ddb8bb45a6426ee347f543376ab99aa5fd811e33"}}}}
{"actor":{"display_login":"soenkehahn"}}