{"action":"created","issue":{"url":"https://api.github.com/repos/purescript/purescript/issues/514","labels_url":"https://api.github.com/repos/purescript/purescript/issues/514/labels{/name}","comments_url":"https://api.github.com/repos/purescript/purescript/issues/514/comments","events_url":"https://api.github.com/repos/purescript/purescript/issues/514/events","html_url":"https://github.com/purescript/purescript/issues/514","id":38847870,"number":514,"title":"Newtype Deriving","user":{"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},"labels":[{"url":"https://api.github.com/repos/purescript/purescript/labels/enhancement","name":"enhancement","color":"84b6eb"},{"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":"","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":52,"closed_issues":10,"state":"open","created_at":"2014-07-08T20:33:33Z","updated_at":"2015-04-19T18:39:15Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2014-07-27T18:47:42Z","updated_at":"2015-04-23T01:12:21Z","closed_at":null,"body":"Since the representation of newtypes is the same as the underlying type, we should be able to \"derive\" instances by just using the existing instance directly.\r\n\r\nSuggested syntax:\r\n\r\n```\r\nnewtype Trace a = Trace (Eff (trace :: Trace) a) deriving (functorEff, applyEff, applicativeEff, bindEff, monadEff)\r\n```\r\n\r\nNote this would allow us to apply optimizations like \"magic do\" to monads derived from `Eff`."},"comment":{"url":"https://api.github.com/repos/purescript/purescript/issues/comments/95380118","html_url":"https://github.com/purescript/purescript/issues/514#issuecomment-95380118","issue_url":"https://api.github.com/repos/purescript/purescript/issues/514","id":95380118,"user":{"login":"hdgarrood","id":1270186,"avatar_url":"https://avatars.githubusercontent.com/u/1270186?v=3","gravatar_id":"","url":"https://api.github.com/users/hdgarrood","html_url":"https://github.com/hdgarrood","followers_url":"https://api.github.com/users/hdgarrood/followers","following_url":"https://api.github.com/users/hdgarrood/following{/other_user}","gists_url":"https://api.github.com/users/hdgarrood/gists{/gist_id}","starred_url":"https://api.github.com/users/hdgarrood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hdgarrood/subscriptions","organizations_url":"https://api.github.com/users/hdgarrood/orgs","repos_url":"https://api.github.com/users/hdgarrood/repos","events_url":"https://api.github.com/users/hdgarrood/events{/privacy}","received_events_url":"https://api.github.com/users/hdgarrood/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T01:12:21Z","updated_at":"2015-04-23T01:12:21Z","body":"Why not use the same syntax that Haskell does?\r\n\r\n```\r\nnewtype Trace a = Trace (Eff (trace :: Trace) a) deriving (Functor, Apply, Applicative, Bind, Monad)\r\n```\r\n"}}