{"action":"created","issue":{"url":"https://api.github.com/repos/purescript/purescript/issues/928","labels_url":"https://api.github.com/repos/purescript/purescript/issues/928/labels{/name}","comments_url":"https://api.github.com/repos/purescript/purescript/issues/928/comments","events_url":"https://api.github.com/repos/purescript/purescript/issues/928/events","html_url":"https://github.com/purescript/purescript/pull/928","id":59407057,"number":928,"title":"Revise class constructor/accessor representation","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":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-03-01T17:19:50Z","updated_at":"2015-03-01T20:25:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/purescript/purescript/pulls/928","html_url":"https://github.com/purescript/purescript/pull/928","diff_url":"https://github.com/purescript/purescript/pull/928.diff","patch_url":"https://github.com/purescript/purescript/pull/928.patch"},"body":"This is almost working, but not quite. All that nonsense about special cases for class constructors, class constructor applications, member accessors is gone in favour of representing classes as standard data constructors... however, now I get a type error when trying to compile the prelude:\r\n\r\n```\r\nError in module Prelude:\r\nError at  line 420, column 3 - line 422, column 3:\r\n  Error in value declaration bindArr:\r\n  Error checking that value\r\n    Prelude.Bind(\\__unused -> <<superclass dict Prelude.Apply>>)(\\m -> \\f -> \\x -> f(m(x))(x))\r\n  has type\r\n    forall r. Prelude.Bind (Prim.Function r)\r\n  Error checking that value\r\n    Prelude.Bind(\\__unused -> <<superclass dict Prelude.Apply>>)(\\m -> \\f -> \\x -> f(m(x))(x))\r\n  has type\r\n    Prelude.Bind (Prim.Function r648)\r\n  Error applying function\r\n    Prelude.Bind(\\__unused -> <<dict False>>)\r\n  of type\r\n    (forall a b. u649 a -> (a -> u649 b) -> u649 b) -> Prelude.Bind u649\r\n  to argument\r\n    \\m -> \\f -> \\x -> f(m(x))(x)\r\n  Error checking that value\r\n    \\m -> \\f -> \\x -> f(m(x))(x)\r\n  has type\r\n    forall a b. u649 a -> (a -> u649 b) -> u649 b\r\n  Error checking that value\r\n    \\m -> \\f -> \\x -> f(m(x))(x)\r\n  has type\r\n    forall a. u649 a -> (a -> u649 b653) -> u649 b653\r\n  Error checking that value\r\n    \\m -> \\f -> \\x -> f(m(x))(x)\r\n  has type\r\n    u649 a655 -> (a655 -> u649 b653) -> u649 b653\r\n  Error at  line 303, column 5 - line 305, column 3:\r\n    Error checking that value\r\n      \\f -> \\x -> f(m(x))(x)\r\n    has type\r\n      (a655 -> u649 b653) -> u649 b653\r\n    Error checking that value\r\n      \\x -> f(m(x))(x)\r\n    has type\r\n      u649 b653\r\n    Expression\r\n      \\x -> f(m(x))(x)\r\n    does not have type\r\n      u649 b653\r\nSee https://github.com/purescript/purescript/wiki/Error-Code-ExprDoesNotHaveType for more information, or to contribute content related to this error.\r\n```\r\n\r\nI could use a hand trying to figure out what's going wrong here, I've experimented a bit compiling something with `no-prelude` thinking it might be to do with higher kinded classes, but a `Functor` class and instance certainly works ok.\r\n\r\nWill close #781 when finished."},"comment":{"url":"https://api.github.com/repos/purescript/purescript/issues/comments/76628439","html_url":"https://github.com/purescript/purescript/pull/928#issuecomment-76628439","issue_url":"https://api.github.com/repos/purescript/purescript/issues/928","id":76628439,"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},"created_at":"2015-03-01T20:25:26Z","updated_at":"2015-03-01T20:25:26Z","body":"`<<dict True>>` is actually `Prelude.Monad u1613`, the pretty printer isn't quite right for class dictionaries... but then I'm not sure why that value is there at all, maybe it is something I'm missing still."}}