{"action":"created","issue":{"url":"https://api.github.com/repos/purescript/purescript/issues/2688","repository_url":"https://api.github.com/repos/purescript/purescript","labels_url":"https://api.github.com/repos/purescript/purescript/issues/2688/labels{/name}","comments_url":"https://api.github.com/repos/purescript/purescript/issues/2688/comments","events_url":"https://api.github.com/repos/purescript/purescript/issues/2688/events","html_url":"https://github.com/purescript/purescript/issues/2688","id":209415024,"number":2688,"title":"New notation for Class and Instances entailment","user":{"login":"rvion","id":2150990,"avatar_url":"https://avatars.githubusercontent.com/u/2150990?v=3","gravatar_id":"","url":"https://api.github.com/users/rvion","html_url":"https://github.com/rvion","followers_url":"https://api.github.com/users/rvion/followers","following_url":"https://api.github.com/users/rvion/following{/other_user}","gists_url":"https://api.github.com/users/rvion/gists{/gist_id}","starred_url":"https://api.github.com/users/rvion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvion/subscriptions","organizations_url":"https://api.github.com/users/rvion/orgs","repos_url":"https://api.github.com/users/rvion/repos","events_url":"https://api.github.com/users/rvion/events{/privacy}","received_events_url":"https://api.github.com/users/rvion/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-02-22T10:41:41Z","updated_at":"2017-02-26T07:37:22Z","closed_at":null,"body":"When I look at things like https://www.wikiwand.com/en/List_of_logic_symbols, I really feel there could be some better notations for entailment\r\n\r\nin logic, there is [Double_turnstile (⊨) for `entails`](https://www.wikiwand.com/en/Double_turnstile)\r\nand it's [reverse form (⫤) ](http://www.fileformat.info/info/unicode/char/2ae4/index.htm)\r\n\r\n💚  I wish class could be\r\n\r\n```purescript \r\ninstance foo :: C x y ⊨ A x, B y \r\ninstance foo :: C x y |= A x, B y\r\n\r\nclass C x y ⊨ A x, B y \r\nclass C x y |= A x, B y\r\n\r\n# instead of \r\n# class A x <= B y <= C x y\r\n# class (A x, B y) <= C x y\r\n```\r\n\r\nI think entailment after the class name is better, because this way, information are always at the same positions, regardless of the number of entailment. I know where to look, and I can read things from general class name to more specific entailment needed.\r\n\r\n## If we want an operator to compose class “constraints\"\r\n\r\nto get the best of both world (notation and composability) we could have a type operator\r\n\r\n```purescript\r\n/\\ :: Constraint -> Constraint -> Constraint\r\n∧ :: Constraint -> Constraint -> Constraint\r\n```\r\n\r\nso we could write \r\n\r\n```\r\nclass C x y ⊨ A x ∧ B y\r\nclass C x y |= A x /\\ B y\r\n```\r\n\r\n------------\r\n\r\nextracted from https://github.com/purescript/purescript/issues/2686#issuecomment-281614252"},"comment":{"url":"https://api.github.com/repos/purescript/purescript/issues/comments/282538971","html_url":"https://github.com/purescript/purescript/issues/2688#issuecomment-282538971","issue_url":"https://api.github.com/repos/purescript/purescript/issues/2688","id":282538971,"user":{"login":"rvion","id":2150990,"avatar_url":"https://avatars.githubusercontent.com/u/2150990?v=3","gravatar_id":"","url":"https://api.github.com/users/rvion","html_url":"https://github.com/rvion","followers_url":"https://api.github.com/users/rvion/followers","following_url":"https://api.github.com/users/rvion/following{/other_user}","gists_url":"https://api.github.com/users/rvion/gists{/gist_id}","starred_url":"https://api.github.com/users/rvion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvion/subscriptions","organizations_url":"https://api.github.com/users/rvion/orgs","repos_url":"https://api.github.com/users/rvion/repos","events_url":"https://api.github.com/users/rvion/events{/privacy}","received_events_url":"https://api.github.com/users/rvion/received_events","type":"User","site_admin":false},"created_at":"2017-02-26T07:37:22Z","updated_at":"2017-02-26T07:37:22Z","body":"Yes, I understood that, I just don't know it it's a desirable byproduct to allow different entailment symbols in type signatures.\r\nTo some extent, I was also thinking that it could have been defined in prim, without proper user-land machinery to alias it or re-define it.\r\nMy initial point was more about `forall a b. Foo a => Bar b => a -> b` not being really nice IMO. I just then gave some ideas to brainstorm around alternative notations. I think I quite like the |= symbol, though, even if I understand it's not - that - important. I also know it's late to change this part of the language, but since you were already discussing the change from `(a,b)=>` to `a=>b=>` I thought the discussion could make sense"}}
{"actor":{"display_login":"rvion"}}