{"action":"created","issue":{"url":"https://api.github.com/repos/goldfirere/singletons/issues/137","labels_url":"https://api.github.com/repos/goldfirere/singletons/issues/137/labels{/name}","comments_url":"https://api.github.com/repos/goldfirere/singletons/issues/137/comments","events_url":"https://api.github.com/repos/goldfirere/singletons/issues/137/events","html_url":"https://github.com/goldfirere/singletons/issues/137","id":124958654,"number":137,"title":"Equality on singleton constructors that require another singleton","user":{"login":"taksuyu","id":1618221,"avatar_url":"https://avatars.githubusercontent.com/u/1618221?v=3","gravatar_id":"","url":"https://api.github.com/users/taksuyu","html_url":"https://github.com/taksuyu","followers_url":"https://api.github.com/users/taksuyu/followers","following_url":"https://api.github.com/users/taksuyu/following{/other_user}","gists_url":"https://api.github.com/users/taksuyu/gists{/gist_id}","starred_url":"https://api.github.com/users/taksuyu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taksuyu/subscriptions","organizations_url":"https://api.github.com/users/taksuyu/orgs","repos_url":"https://api.github.com/users/taksuyu/repos","events_url":"https://api.github.com/users/taksuyu/events{/privacy}","received_events_url":"https://api.github.com/users/taksuyu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-05T12:32:39Z","updated_at":"2016-01-06T03:43:10Z","closed_at":"2016-01-06T03:43:10Z","body":"With the classic Nat example\r\n```haskell\r\n$(singletons [d|\r\n  data Nat\r\n    = S Nat\r\n    | Z\r\n    deriving (Eq)\r\n    |])\r\n\r\n-- fromSing $ SZ %:== SZ is True\r\n-- fromSing $ SS SZ %:== SS SZ is True\r\n-- fromSing $ SS %:== SS (doesn't compile because it's applied to too few arguments)\r\n```\r\nI can't think of any reason for `Sing n -> Sing ('S n)` to not be sufficiently typed to solve this. Even if we were to add another constructor that took a Nat as a value then it'd produce a different singleton type like `Sing n -> Sing ('Val n)`. Is there some way to get this equality?\r\n\r\nEdit: I noticed I'm also on 1.1.2.1 as it's what's packaged with stackage, so I apologize if this is already a thing that works."},"comment":{"url":"https://api.github.com/repos/goldfirere/singletons/issues/comments/169213137","html_url":"https://github.com/goldfirere/singletons/issues/137#issuecomment-169213137","issue_url":"https://api.github.com/repos/goldfirere/singletons/issues/137","id":169213137,"user":{"login":"goldfirere","id":1958003,"avatar_url":"https://avatars.githubusercontent.com/u/1958003?v=3","gravatar_id":"","url":"https://api.github.com/users/goldfirere","html_url":"https://github.com/goldfirere","followers_url":"https://api.github.com/users/goldfirere/followers","following_url":"https://api.github.com/users/goldfirere/following{/other_user}","gists_url":"https://api.github.com/users/goldfirere/gists{/gist_id}","starred_url":"https://api.github.com/users/goldfirere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldfirere/subscriptions","organizations_url":"https://api.github.com/users/goldfirere/orgs","repos_url":"https://api.github.com/users/goldfirere/repos","events_url":"https://api.github.com/users/goldfirere/events{/privacy}","received_events_url":"https://api.github.com/users/goldfirere/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T03:43:10Z","updated_at":"2016-01-06T03:43:10Z","body":"@vladfi1 is right. You may also find `singFun1` useful if you want to consider functions as singletons. Closing the ticket, but if there is a concrete improvement you can see here (including in documentation) please do reopen. Thanks!"}}