{"action":"created","comment":{"url":"https://api.github.com/repos/sanctuary-js/sanctuary/pulls/comments/93915054","pull_request_review_id":14446594,"id":93915054,"diff_hunk":"@@ -17,47 +17,46 @@ test('gets', function() {\n          TypeError,\n          'Invalid value\\n' +\n          '\\n' +\n-         'gets :: Accessible a => TypeRep -> Array String -> a -> Maybe b\\n' +\n-         '                        ^^^^^^^\\n' +\n+         'gets :: Accessible a => Function -> Array String -> a -> Maybe c\\n' +\n+         '                        ^^^^^^^^\\n' +\n          '                           1\\n' +\n          '\\n' +\n          '1)  [1, 2, 3] :: Array Number, Array FiniteNumber, Array NonZeroFiniteNumber, Array Integer, Array ValidNumber\\n' +\n          '\\n' +\n-         'The value at position 1 is not a member of ‘TypeRep’.\\n');\n+         'The value at position 1 is not a member of ‘Function’.\\n');\n \n-  throws(function() { S.gets(Number, null); },\n+  throws(function() { S.gets(S.K(true), null); },\n          TypeError,\n          'Invalid value\\n' +\n          '\\n' +\n-         'gets :: Accessible a => TypeRep -> Array String -> a -> Maybe b\\n' +\n-         '                                   ^^^^^^^^^^^^\\n' +\n-         '                                        1\\n' +\n+         'gets :: Accessible a => Function -> Array String -> a -> Maybe c\\n' +\n+         '                                    ^^^^^^^^^^^^\\n' +\n+         '                                         1\\n' +\n          '\\n' +\n          '1)  null :: Null\\n' +\n          '\\n' +\n          'The value at position 1 is not a member of ‘Array String’.\\n');\n \n-  throws(function() { S.gets(Number, [], null); },\n+  throws(function() { S.gets(S.K(true), [], null); },\n          TypeError,\n          'Type-class constraint violation\\n' +\n          '\\n' +\n-         'gets :: Accessible a => TypeRep -> Array String -> a -> Maybe b\\n' +\n-         '        ^^^^^^^^^^^^                               ^\\n' +\n-         '                                                   1\\n' +\n+         'gets :: Accessible a => Function -> Array String -> a -> Maybe c\\n' +\n+         '        ^^^^^^^^^^^^                                ^\\n' +\n+         '                                                    1\\n' +\n          '\\n' +\n          '1)  null :: Null\\n' +\n          '\\n' +\n          '‘gets’ requires ‘a’ to satisfy the Accessible type-class constraint; the value at position 1 does not.\\n');\n \n-  eq(S.gets(Number, ['x'], {x: {z: 0}, y: 42}), S.Nothing);\n-  eq(S.gets(Number, ['y'], {x: {z: 0}, y: 42}), S.Just(42));\n-  eq(S.gets(Number, ['z'], {x: {z: 0}, y: 42}), S.Nothing);\n-  eq(S.gets(Number, ['x', 'z'], {x: {z: 0}, y: 42}), S.Just(0));\n-  eq(S.gets(Number, ['a', 'b', 'c'], {x: {z: 0}, y: 42}), S.Nothing);\n-  eq(S.gets(Number, [], {x: {z: 0}, y: 42}), S.Nothing);\n-  eq(S.gets(Object, [], {x: {z: 0}, y: 42}), S.Just({x: {z: 0}, y: 42}));\n+  eq(S.gets(S.is(Number), ['x'], {x: {z: 0}, y: 42}), S.Nothing);\n+  eq(S.gets(S.is(Number), ['y'], {x: {z: 0}, y: 42}), S.Just(42));\n+  eq(S.gets(S.is(Number), ['z'], {x: {z: 0}, y: 42}), S.Nothing);\n+  eq(S.gets(S.is(Number), ['x', 'z'], {x: {z: 0}, y: 42}), S.Just(0));\n+  eq(S.gets(S.is(Number), ['a', 'b', 'c'], {x: {z: 0}, y: 42}), S.Nothing);\n+  eq(S.gets(S.is(Number), [], {x: {z: 0}, y: 42}), S.Nothing);\n+  eq(S.gets(S.is(Object), [], {x: {z: 0}, y: 42}), S.Just({x: {z: 0}, y: 42}));\n \n-  eq(S.gets(RegExp, ['x'], {x: vm.runInNewContext('/.*/')}), S.Just(/.*/));\n-  eq(S.gets(vm.runInNewContext('RegExp'), ['x'], {x: /.*/}), S.Just(/.*/));\n+  eq(S.gets(S.K(true), ['x'], {x: vm.runInNewContext('/.*/')}), S.Just(/.*/));","path":"test/gets.js","position":64,"original_position":64,"commit_id":"e9490adff1f4b3a456f23ae86efab6a0c3eec960","original_commit_id":"e9490adff1f4b3a456f23ae86efab6a0c3eec960","user":{"login":"davidchambers","id":210406,"avatar_url":"https://avatars.githubusercontent.com/u/210406?v=3","gravatar_id":"","url":"https://api.github.com/users/davidchambers","html_url":"https://github.com/davidchambers","followers_url":"https://api.github.com/users/davidchambers/followers","following_url":"https://api.github.com/users/davidchambers/following{/other_user}","gists_url":"https://api.github.com/users/davidchambers/gists{/gist_id}","starred_url":"https://api.github.com/users/davidchambers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidchambers/subscriptions","organizations_url":"https://api.github.com/users/davidchambers/orgs","repos_url":"https://api.github.com/users/davidchambers/repos","events_url":"https://api.github.com/users/davidchambers/events{/privacy}","received_events_url":"https://api.github.com/users/davidchambers/received_events","type":"User","site_admin":false},"body":"This is what I had in mind:\r\n\r\n```diff\r\n-  eq(S.gets(RegExp, ['x'], {x: vm.runInNewContext('/.*/')}), S.Just(/.*/));\r\n-  eq(S.gets(vm.runInNewContext('RegExp'), ['x'], {x: /.*/}), S.Just(/.*/));\r\n+  eq(S.gets(S.is(RegExp), ['x'], {x: vm.runInNewContext('/.*/')}), S.Just(/.*/));\r\n+  eq(S.gets(S.is(vm.runInNewContext('RegExp')), ['x'], {x: /.*/}), S.Just(/.*/));\r\n```\r\n\r\nThis way we'd continue to assert that a regexp from one environment is a member of the type represented by `RegExp` from another environment. Admittedly this is really testing `is` rather than `gets`, but that's okay.\r\n","created_at":"2016-12-27T09:59:31Z","updated_at":"2016-12-27T09:59:31Z","html_url":"https://github.com/sanctuary-js/sanctuary/pull/191#discussion_r93915054","pull_request_url":"https://api.github.com/repos/sanctuary-js/sanctuary/pulls/191","_links":{"self":{"href":"https://api.github.com/repos/sanctuary-js/sanctuary/pulls/comments/93915054"},"html":{"href":"https://github.com/sanctuary-js/sanctuary/pull/191#discussion_r93915054"},"pull_request":{"href":"https://api.github.com/repos/sanctuary-js/sanctuary/pulls/191"}}},"pull_request":{"url":"https://api.github.com/repos/sanctuary-js/sanctuary/pulls/191","id":67606625,"html_url":"https://github.com/sanctuary-js/sanctuary/pull/191","diff_url":"https://github.com/sanctuary-js/sanctuary/pull/191.diff","patch_url":"https://github.com/sanctuary-js/sanctuary/pull/191.patch","issue_url":"https://api.github.com/repos/sanctuary-js/sanctuary/issues/191","number":191,"state":"open","locked":false,"title":"Change type validators to use predicate instead of TypeRep","user":{"login":"Avaq","id":1217745,"avatar_url":"https://avatars.githubusercontent.com/u/1217745?v=3","gravatar_id":"","url":"https://api.github.com/users/Avaq","html_url":"https://github.com/Avaq","followers_url":"https://api.github.com/users/Avaq/followers","following_url":"https://api.github.com/users/Avaq/following{/other_user}","gists_url":"https://api.github.com/users/Avaq/gists{/gist_id}","starred_url":"https://api.github.com/users/Avaq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Avaq/subscriptions","organizations_url":"https://api.github.com/users/Avaq/orgs","repos_url":"https://api.github.com/users/Avaq/repos","events_url":"https://api.github.com/users/Avaq/events{/privacy}","received_events_url":"https://api.github.com/users/Avaq/received_events","type":"User","site_admin":false},"body":"Commit description:\r\n\r\n> This commit will close #149 by changing all functions\r\n> that have built-in type validation to use predicates\r\n> instead of TypeReps to perform their validations.\r\n> \r\n> The functions affected are:\r\n> - get()\r\n> - gets()\r\n> - parseJson()\r\n> \r\n> The only function untouched is `is()`, for it is used\r\n> to turn a TypeRep into a predicate.\r\n","created_at":"2016-04-23T13:24:32Z","updated_at":"2016-12-27T09:59:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c92a8b16cf9359c43a80bb761c0e64ed7309d96d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sanctuary-js/sanctuary/pulls/191/commits","review_comments_url":"https://api.github.com/repos/sanctuary-js/sanctuary/pulls/191/comments","review_comment_url":"https://api.github.com/repos/sanctuary-js/sanctuary/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sanctuary-js/sanctuary/issues/191/comments","statuses_url":"https://api.github.com/repos/sanctuary-js/sanctuary/statuses/e9490adff1f4b3a456f23ae86efab6a0c3eec960","head":{"label":"sanctuary-js:av-predicate-type-validation","ref":"av-predicate-type-validation","sha":"e9490adff1f4b3a456f23ae86efab6a0c3eec960","user":{"login":"sanctuary-js","id":18357498,"avatar_url":"https://avatars.githubusercontent.com/u/18357498?v=3","gravatar_id":"","url":"https://api.github.com/users/sanctuary-js","html_url":"https://github.com/sanctuary-js","followers_url":"https://api.github.com/users/sanctuary-js/followers","following_url":"https://api.github.com/users/sanctuary-js/following{/other_user}","gists_url":"https://api.github.com/users/sanctuary-js/gists{/gist_id}","starred_url":"https://api.github.com/users/sanctuary-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanctuary-js/subscriptions","organizations_url":"https://api.github.com/users/sanctuary-js/orgs","repos_url":"https://api.github.com/users/sanctuary-js/repos","events_url":"https://api.github.com/users/sanctuary-js/events{/privacy}","received_events_url":"https://api.github.com/users/sanctuary-js/received_events","type":"Organization","site_admin":false},"repo":{"id":29455960,"name":"sanctuary","full_name":"sanctuary-js/sanctuary","owner":{"login":"sanctuary-js","id":18357498,"avatar_url":"https://avatars.githubusercontent.com/u/18357498?v=3","gravatar_id":"","url":"https://api.github.com/users/sanctuary-js","html_url":"https://github.com/sanctuary-js","followers_url":"https://api.github.com/users/sanctuary-js/followers","following_url":"https://api.github.com/users/sanctuary-js/following{/other_user}","gists_url":"https://api.github.com/users/sanctuary-js/gists{/gist_id}","starred_url":"https://api.github.com/users/sanctuary-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanctuary-js/subscriptions","organizations_url":"https://api.github.com/users/sanctuary-js/orgs","repos_url":"https://api.github.com/users/sanctuary-js/repos","events_url":"https://api.github.com/users/sanctuary-js/events{/privacy}","received_events_url":"https://api.github.com/users/sanctuary-js/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sanctuary-js/sanctuary","description":":see_no_evil: Refuge from unsafe JavaScript","fork":false,"url":"https://api.github.com/repos/sanctuary-js/sanctuary","forks_url":"https://api.github.com/repos/sanctuary-js/sanctuary/forks","keys_url":"https://api.github.com/repos/sanctuary-js/sanctuary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sanctuary-js/sanctuary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sanctuary-js/sanctuary/teams","hooks_url":"https://api.github.com/repos/sanctuary-js/sanctuary/hooks","issue_events_url":"https://api.github.com/repos/sanctuary-js/sanctuary/issues/events{/number}","events_url":"https://api.github.com/repos/sanctuary-js/sanctuary/events","assignees_url":"https://api.github.com/repos/sanctuary-js/sanctuary/assignees{/user}","branches_url":"https://api.github.com/repos/sanctuary-js/sanctuary/branches{/branch}","tags_url":"https://api.github.com/repos/sanctuary-js/sanctuary/tags","blobs_url":"https://api.github.com/repos/sanctuary-js/sanctuary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sanctuary-js/sanctuary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sanctuary-js/sanctuary/git/refs{/sha}","trees_url":"https://api.github.com/repos/sanctuary-js/sanctuary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sanctuary-js/sanctuary/statuses/{sha}","languages_url":"https://api.github.com/repos/sanctuary-js/sanctuary/languages","stargazers_url":"https://api.github.com/repos/sanctuary-js/sanctuary/stargazers","contributors_url":"https://api.github.com/repos/sanctuary-js/sanctuary/contributors","subscribers_url":"https://api.github.com/repos/sanctuary-js/sanctuary/subscribers","subscription_url":"https://api.github.com/repos/sanctuary-js/sanctuary/subscription","commits_url":"https://api.github.com/repos/sanctuary-js/sanctuary/commits{/sha}","git_commits_url":"https://api.github.com/repos/sanctuary-js/sanctuary/git/commits{/sha}","comments_url":"https://api.github.com/repos/sanctuary-js/sanctuary/comments{/number}","issue_comment_url":"https://api.github.com/repos/sanctuary-js/sanctuary/issues/comments{/number}","contents_url":"https://api.github.com/repos/sanctuary-js/sanctuary/contents/{+path}","compare_url":"https://api.github.com/repos/sanctuary-js/sanctuary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sanctuary-js/sanctuary/merges","archive_url":"https://api.github.com/repos/sanctuary-js/sanctuary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sanctuary-js/sanctuary/downloads","issues_url":"https://api.github.com/repos/sanctuary-js/sanctuary/issues{/number}","pulls_url":"https://api.github.com/repos/sanctuary-js/sanctuary/pulls{/number}","milestones_url":"https://api.github.com/repos/sanctuary-js/sanctuary/milestones{/number}","notifications_url":"https://api.github.com/repos/sanctuary-js/sanctuary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sanctuary-js/sanctuary/labels{/name}","releases_url":"https://api.github.com/repos/sanctuary-js/sanctuary/releases{/id}","deployments_url":"https://api.github.com/repos/sanctuary-js/sanctuary/deployments","created_at":"2015-01-19T05:52:10Z","updated_at":"2016-12-25T16:30:04Z","pushed_at":"2016-12-27T09:40:22Z","git_url":"git://github.com/sanctuary-js/sanctuary.git","ssh_url":"git@github.com:sanctuary-js/sanctuary.git","clone_url":"https://github.com/sanctuary-js/sanctuary.git","svn_url":"https://github.com/sanctuary-js/sanctuary","homepage":"https://sanctuary.js.org","size":947,"stargazers_count":573,"watchers_count":573,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":32,"forks":34,"open_issues":32,"watchers":573,"default_branch":"master"}},"base":{"label":"sanctuary-js:master","ref":"master","sha":"bd2fb5ceca7dd967522591e4450bf331bbacd316","user":{"login":"sanctuary-js","id":18357498,"avatar_url":"https://avatars.githubusercontent.com/u/18357498?v=3","gravatar_id":"","url":"https://api.github.com/users/sanctuary-js","html_url":"https://github.com/sanctuary-js","followers_url":"https://api.github.com/users/sanctuary-js/followers","following_url":"https://api.github.com/users/sanctuary-js/following{/other_user}","gists_url":"https://api.github.com/users/sanctuary-js/gists{/gist_id}","starred_url":"https://api.github.com/users/sanctuary-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanctuary-js/subscriptions","organizations_url":"https://api.github.com/users/sanctuary-js/orgs","repos_url":"https://api.github.com/users/sanctuary-js/repos","events_url":"https://api.github.com/users/sanctuary-js/events{/privacy}","received_events_url":"https://api.github.com/users/sanctuary-js/received_events","type":"Organization","site_admin":false},"repo":{"id":29455960,"name":"sanctuary","full_name":"sanctuary-js/sanctuary","owner":{"login":"sanctuary-js","id":18357498,"avatar_url":"https://avatars.githubusercontent.com/u/18357498?v=3","gravatar_id":"","url":"https://api.github.com/users/sanctuary-js","html_url":"https://github.com/sanctuary-js","followers_url":"https://api.github.com/users/sanctuary-js/followers","following_url":"https://api.github.com/users/sanctuary-js/following{/other_user}","gists_url":"https://api.github.com/users/sanctuary-js/gists{/gist_id}","starred_url":"https://api.github.com/users/sanctuary-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanctuary-js/subscriptions","organizations_url":"https://api.github.com/users/sanctuary-js/orgs","repos_url":"https://api.github.com/users/sanctuary-js/repos","events_url":"https://api.github.com/users/sanctuary-js/events{/privacy}","received_events_url":"https://api.github.com/users/sanctuary-js/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sanctuary-js/sanctuary","description":":see_no_evil: Refuge from unsafe JavaScript","fork":false,"url":"https://api.github.com/repos/sanctuary-js/sanctuary","forks_url":"https://api.github.com/repos/sanctuary-js/sanctuary/forks","keys_url":"https://api.github.com/repos/sanctuary-js/sanctuary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sanctuary-js/sanctuary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sanctuary-js/sanctuary/teams","hooks_url":"https://api.github.com/repos/sanctuary-js/sanctuary/hooks","issue_events_url":"https://api.github.com/repos/sanctuary-js/sanctuary/issues/events{/number}","events_url":"https://api.github.com/repos/sanctuary-js/sanctuary/events","assignees_url":"https://api.github.com/repos/sanctuary-js/sanctuary/assignees{/user}","branches_url":"https://api.github.com/repos/sanctuary-js/sanctuary/branches{/branch}","tags_url":"https://api.github.com/repos/sanctuary-js/sanctuary/tags","blobs_url":"https://api.github.com/repos/sanctuary-js/sanctuary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sanctuary-js/sanctuary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sanctuary-js/sanctuary/git/refs{/sha}","trees_url":"https://api.github.com/repos/sanctuary-js/sanctuary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sanctuary-js/sanctuary/statuses/{sha}","languages_url":"https://api.github.com/repos/sanctuary-js/sanctuary/languages","stargazers_url":"https://api.github.com/repos/sanctuary-js/sanctuary/stargazers","contributors_url":"https://api.github.com/repos/sanctuary-js/sanctuary/contributors","subscribers_url":"https://api.github.com/repos/sanctuary-js/sanctuary/subscribers","subscription_url":"https://api.github.com/repos/sanctuary-js/sanctuary/subscription","commits_url":"https://api.github.com/repos/sanctuary-js/sanctuary/commits{/sha}","git_commits_url":"https://api.github.com/repos/sanctuary-js/sanctuary/git/commits{/sha}","comments_url":"https://api.github.com/repos/sanctuary-js/sanctuary/comments{/number}","issue_comment_url":"https://api.github.com/repos/sanctuary-js/sanctuary/issues/comments{/number}","contents_url":"https://api.github.com/repos/sanctuary-js/sanctuary/contents/{+path}","compare_url":"https://api.github.com/repos/sanctuary-js/sanctuary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sanctuary-js/sanctuary/merges","archive_url":"https://api.github.com/repos/sanctuary-js/sanctuary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sanctuary-js/sanctuary/downloads","issues_url":"https://api.github.com/repos/sanctuary-js/sanctuary/issues{/number}","pulls_url":"https://api.github.com/repos/sanctuary-js/sanctuary/pulls{/number}","milestones_url":"https://api.github.com/repos/sanctuary-js/sanctuary/milestones{/number}","notifications_url":"https://api.github.com/repos/sanctuary-js/sanctuary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sanctuary-js/sanctuary/labels{/name}","releases_url":"https://api.github.com/repos/sanctuary-js/sanctuary/releases{/id}","deployments_url":"https://api.github.com/repos/sanctuary-js/sanctuary/deployments","created_at":"2015-01-19T05:52:10Z","updated_at":"2016-12-25T16:30:04Z","pushed_at":"2016-12-27T09:40:22Z","git_url":"git://github.com/sanctuary-js/sanctuary.git","ssh_url":"git@github.com:sanctuary-js/sanctuary.git","clone_url":"https://github.com/sanctuary-js/sanctuary.git","svn_url":"https://github.com/sanctuary-js/sanctuary","homepage":"https://sanctuary.js.org","size":947,"stargazers_count":573,"watchers_count":573,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":32,"forks":34,"open_issues":32,"watchers":573,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sanctuary-js/sanctuary/pulls/191"},"html":{"href":"https://github.com/sanctuary-js/sanctuary/pull/191"},"issue":{"href":"https://api.github.com/repos/sanctuary-js/sanctuary/issues/191"},"comments":{"href":"https://api.github.com/repos/sanctuary-js/sanctuary/issues/191/comments"},"review_comments":{"href":"https://api.github.com/repos/sanctuary-js/sanctuary/pulls/191/comments"},"review_comment":{"href":"https://api.github.com/repos/sanctuary-js/sanctuary/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sanctuary-js/sanctuary/pulls/191/commits"},"statuses":{"href":"https://api.github.com/repos/sanctuary-js/sanctuary/statuses/e9490adff1f4b3a456f23ae86efab6a0c3eec960"}}}}
{"actor":{"display_login":"davidchambers"}}