{"action":"created","issue":{"url":"https://api.github.com/repos/purescript/purescript/issues/2217","repository_url":"https://api.github.com/repos/purescript/purescript","labels_url":"https://api.github.com/repos/purescript/purescript/issues/2217/labels{/name}","comments_url":"https://api.github.com/repos/purescript/purescript/issues/2217/comments","events_url":"https://api.github.com/repos/purescript/purescript/issues/2217/events","html_url":"https://github.com/purescript/purescript/issues/2217","id":163833581,"number":2217,"title":"Purescript row type checking","user":{"login":"Risto-Stevcev","id":6767374,"avatar_url":"https://avatars.githubusercontent.com/u/6767374?v=3","gravatar_id":"","url":"https://api.github.com/users/Risto-Stevcev","html_url":"https://github.com/Risto-Stevcev","followers_url":"https://api.github.com/users/Risto-Stevcev/followers","following_url":"https://api.github.com/users/Risto-Stevcev/following{/other_user}","gists_url":"https://api.github.com/users/Risto-Stevcev/gists{/gist_id}","starred_url":"https://api.github.com/users/Risto-Stevcev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Risto-Stevcev/subscriptions","organizations_url":"https://api.github.com/users/Risto-Stevcev/orgs","repos_url":"https://api.github.com/users/Risto-Stevcev/repos","events_url":"https://api.github.com/users/Risto-Stevcev/events{/privacy}","received_events_url":"https://api.github.com/users/Risto-Stevcev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/purescript/purescript/labels/typechecker","name":"typechecker","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/purescript/purescript/milestones/12","html_url":"https://github.com/purescript/purescript/milestones/Discussion","labels_url":"https://api.github.com/repos/purescript/purescript/milestones/12/labels","id":1373373,"number":12,"title":"Discussion","description":"Longer discussions on the direction of the project, etc.","creator":{"login":"paf31","id":630306,"avatar_url":"https://avatars.githubusercontent.com/u/630306?v=3","gravatar_id":"","url":"https://api.github.com/users/paf31","html_url":"https://github.com/paf31","followers_url":"https://api.github.com/users/paf31/followers","following_url":"https://api.github.com/users/paf31/following{/other_user}","gists_url":"https://api.github.com/users/paf31/gists{/gist_id}","starred_url":"https://api.github.com/users/paf31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paf31/subscriptions","organizations_url":"https://api.github.com/users/paf31/orgs","repos_url":"https://api.github.com/users/paf31/repos","events_url":"https://api.github.com/users/paf31/events{/privacy}","received_events_url":"https://api.github.com/users/paf31/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":17,"state":"open","created_at":"2015-10-23T21:40:18Z","updated_at":"2016-07-05T20:06:05Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2016-07-05T11:56:18Z","updated_at":"2016-07-05T22:37:32Z","closed_at":null,"body":"Currently there doesn't seem to be a way to have typed rows. You can explicitly declare types for keys like this:\r\n\r\n```\r\nmkPerson :: forall e. { first :: String, last :: String | e } -> Schema\r\n```\r\n\r\nBut for any additional key-value pairs in the row, it won't type-check that it's a String in this example. Something like this would be nice, which would be equivalent to a typed row:\r\n\r\n```\r\nmkPerson :: forall e. { | e :: String } -> Schema\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/purescript/purescript/issues/comments/230623032","html_url":"https://github.com/purescript/purescript/issues/2217#issuecomment-230623032","issue_url":"https://api.github.com/repos/purescript/purescript/issues/2217","id":230623032,"user":{"login":"Risto-Stevcev","id":6767374,"avatar_url":"https://avatars.githubusercontent.com/u/6767374?v=3","gravatar_id":"","url":"https://api.github.com/users/Risto-Stevcev","html_url":"https://github.com/Risto-Stevcev","followers_url":"https://api.github.com/users/Risto-Stevcev/followers","following_url":"https://api.github.com/users/Risto-Stevcev/following{/other_user}","gists_url":"https://api.github.com/users/Risto-Stevcev/gists{/gist_id}","starred_url":"https://api.github.com/users/Risto-Stevcev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Risto-Stevcev/subscriptions","organizations_url":"https://api.github.com/users/Risto-Stevcev/orgs","repos_url":"https://api.github.com/users/Risto-Stevcev/repos","events_url":"https://api.github.com/users/Risto-Stevcev/events{/privacy}","received_events_url":"https://api.github.com/users/Risto-Stevcev/received_events","type":"User","site_admin":false},"created_at":"2016-07-05T22:37:31Z","updated_at":"2016-07-05T22:37:31Z","body":"Actually `Map` and `StrMap` wouldn't work (at least not elegantly) because this needs to allow any kind of arbitrary nesting, like this:\r\n\r\n```\r\nfoo :: forall a. { | a :: Int } -> Schema\r\nbar = foo { foo: 2, bar: 3, baz: { qux: 4 } }\r\n```\r\n\r\nBasically I want something like this for an API to a JS library and I want it to check that it's correct at compile time rather than runtime.\r\n\r\nI don't know how polymorphic labels work (I can't find an example of how it works). As far as I can tell row constraints are a way of comparing rows with disjoint union, and I'm not sure this would help (at least I'm not seeing it right now). I think it would be an extremely useful feature."}}
{"actor":{"display_login":"Risto-Stevcev"}}