{"action":"created","issue":{"url":"https://api.github.com/repos/purescript/purescript-prelude/issues/128","repository_url":"https://api.github.com/repos/purescript/purescript-prelude","labels_url":"https://api.github.com/repos/purescript/purescript-prelude/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/purescript/purescript-prelude/issues/128/comments","events_url":"https://api.github.com/repos/purescript/purescript-prelude/issues/128/events","html_url":"https://github.com/purescript/purescript-prelude/issues/128","id":236543644,"number":128,"title":"Re-add DivisionRing?","user":{"login":"hdgarrood","id":1270186,"avatar_url":"https://avatars1.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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-06-16T17:19:34Z","updated_at":"2017-06-22T13:30:18Z","closed_at":null,"body":"I am working on a quaternion library and I was wondering if it might make sense to add a `DivisionRing` type class again, as follows:\r\n\r\n```purescript\r\nclass Ring a <= DivisionRing a where\r\n  recip :: a -> a\r\n```\r\n\r\nwith the law that `x * recip x = recip x * x = one` for all nonzero `x`. There's no requirement for the ring to be commutative, and so this would allow us to provide a `DivisionRing Quaternion` instance.\r\n\r\nIf we were going to do this, we should change `Field` so that `DivisionRing` is a subclass as well.\r\n\r\nNow of course with any `EuclideanRing` you can simply write `one / x` for `recip x`. Also, admittedly, the only 'useful' instance I can think of is `Quaternion`; I did some googling and wasn't really able to find any other useful examples of non-commutative division rings. But I think it would be nice to have a way of asking for the multiplicative inverse of an element of an arbitrary division ring without requiring it to be commutative."},"comment":{"url":"https://api.github.com/repos/purescript/purescript-prelude/issues/comments/310380445","html_url":"https://github.com/purescript/purescript-prelude/issues/128#issuecomment-310380445","issue_url":"https://api.github.com/repos/purescript/purescript-prelude/issues/128","id":310380445,"user":{"login":"garyb","id":693642,"avatar_url":"https://avatars3.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":"2017-06-22T13:30:18Z","updated_at":"2017-06-22T13:30:18Z","body":"Unfortunately instances like that don't work, they overlap with everything as the `a` commits before the constraints are checked."}}
{"actor":{"display_login":"garyb"}}