{"action":"created","issue":{"url":"https://api.github.com/repos/purescript/purescript/issues/1886","repository_url":"https://api.github.com/repos/purescript/purescript","labels_url":"https://api.github.com/repos/purescript/purescript/issues/1886/labels{/name}","comments_url":"https://api.github.com/repos/purescript/purescript/issues/1886/comments","events_url":"https://api.github.com/repos/purescript/purescript/issues/1886/events","html_url":"https://github.com/purescript/purescript/issues/1886","id":133567389,"number":1886,"title":"Modular typeclasses","user":{"login":"garyb","id":693642,"avatar_url":"https://avatars.githubusercontent.com/u/693642?v=3","gravatar_id":"","url":"https://api.github.com/users/garyb","html_url":"https://github.com/garyb","followers_url":"https://api.github.com/users/garyb/followers","following_url":"https://api.github.com/users/garyb/following{/other_user}","gists_url":"https://api.github.com/users/garyb/gists{/gist_id}","starred_url":"https://api.github.com/users/garyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garyb/subscriptions","organizations_url":"https://api.github.com/users/garyb/orgs","repos_url":"https://api.github.com/users/garyb/repos","events_url":"https://api.github.com/users/garyb/events{/privacy}","received_events_url":"https://api.github.com/users/garyb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/purescript/purescript/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/purescript/purescript/labels/modules","name":"modules","color":"207de5"},{"url":"https://api.github.com/repos/purescript/purescript/labels/typechecker","name":"typechecker","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/purescript/purescript/milestones/8","html_url":"https://github.com/purescript/purescript/milestones/Ideas","labels_url":"https://api.github.com/repos/purescript/purescript/milestones/8/labels","id":714450,"number":8,"title":"Ideas","description":"Ideas which may or may not be implemented, for discussion.","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":47,"closed_issues":64,"state":"open","created_at":"2014-07-08T20:33:33Z","updated_at":"2016-03-11T16:49:32Z","due_on":null,"closed_at":null},"comments":40,"created_at":"2016-02-14T18:59:56Z","updated_at":"2016-03-18T20:49:35Z","closed_at":null,"body":"From [a twitter thread](https://twitter.com/jonsterling/status/698931840103555072) and RL discussions.\r\n\r\n@jonsterling would you mind outlining how you think this would work and affect the language again? Nitty gritty doesn't matter too much, but just so we all have a broad picture to start with at least."},"comment":{"url":"https://api.github.com/repos/purescript/purescript/issues/comments/198535924","html_url":"https://github.com/purescript/purescript/issues/1886#issuecomment-198535924","issue_url":"https://api.github.com/repos/purescript/purescript/issues/1886","id":198535924,"user":{"login":"jonsterling","id":55057,"avatar_url":"https://avatars.githubusercontent.com/u/55057?v=3","gravatar_id":"","url":"https://api.github.com/users/jonsterling","html_url":"https://github.com/jonsterling","followers_url":"https://api.github.com/users/jonsterling/followers","following_url":"https://api.github.com/users/jonsterling/following{/other_user}","gists_url":"https://api.github.com/users/jonsterling/gists{/gist_id}","starred_url":"https://api.github.com/users/jonsterling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonsterling/subscriptions","organizations_url":"https://api.github.com/users/jonsterling/orgs","repos_url":"https://api.github.com/users/jonsterling/repos","events_url":"https://api.github.com/users/jonsterling/events{/privacy}","received_events_url":"https://api.github.com/users/jonsterling/received_events","type":"User","site_admin":false},"created_at":"2016-03-18T20:49:35Z","updated_at":"2016-03-18T20:49:35Z","body":"part of the reason for eschewing global coherence *entirely* (as opposed to having it coexist with a separate module system) would be that we want a system in which only local properties are ever expressible and observable. the presence of even a single instance of global reasoning is totally destructive to the practice of breaking reusable and abstracted code into useful libraries in a scalable and tractable way.  that's why I prefer to do away with global / anti-local reasoning entirely, rather than introduce a separate facility which has only local identity.\n\nanyway, trade-offs abound as you know. but that's my 2c. \n\n\n\n> On Mar 18, 2016, at 4:44 PM, Chris Allen <notifications@github.com> wrote:\n> \n> @garyb >this might almost be plug-in-able\n> \n> It is, if you don't have anything you need to enforce global uniqueness for.\n> \n> To be clear, as we're discussing this, I am trying to figure out a way to obtain the benefits of modules (probably only with generative functors like Jon prefers) without compromising typeclasses. I think we can address problems like John mentioned (having to depend on everything in the universe) without breaking typeclasses (scoped orphan instances, abandoning them for modular typeclasses).\n> \n> Is there a good reason we can't just have both at the same time and maintain global scoping and no-orphans for typeclasses? It means instances wouldn't be encapsulated in modules, but that's sorta the point of typeclasses. Everything else should be kosher and encapsulated within modules I think. This would also give users an opportunity to begin migrating stuff that should've been a module instead of a typeclass over as well.\n> \n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly or view it on GitHub\n> \n"}}