{"action":"created","issue":{"url":"https://api.github.com/repos/idris-lang/Idris-dev/issues/3272","repository_url":"https://api.github.com/repos/idris-lang/Idris-dev","labels_url":"https://api.github.com/repos/idris-lang/Idris-dev/issues/3272/labels{/name}","comments_url":"https://api.github.com/repos/idris-lang/Idris-dev/issues/3272/comments","events_url":"https://api.github.com/repos/idris-lang/Idris-dev/issues/3272/events","html_url":"https://github.com/idris-lang/Idris-dev/issues/3272","id":165828583,"number":3272,"title":"Error when Case Splitting a Pattern Variable.","user":{"login":"jfdm","id":331273,"avatar_url":"https://avatars.githubusercontent.com/u/331273?v=3","gravatar_id":"","url":"https://api.github.com/users/jfdm","html_url":"https://github.com/jfdm","followers_url":"https://api.github.com/users/jfdm/followers","following_url":"https://api.github.com/users/jfdm/following{/other_user}","gists_url":"https://api.github.com/users/jfdm/gists{/gist_id}","starred_url":"https://api.github.com/users/jfdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfdm/subscriptions","organizations_url":"https://api.github.com/users/jfdm/orgs","repos_url":"https://api.github.com/users/jfdm/repos","events_url":"https://api.github.com/users/jfdm/events{/privacy}","received_events_url":"https://api.github.com/users/jfdm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/idris-lang/Idris-dev/labels/A-Confirmed","name":"A-Confirmed","color":"fbca04"},{"url":"https://api.github.com/repos/idris-lang/Idris-dev/labels/C-Moderate%20Effort","name":"C-Moderate Effort","color":"006b75"},{"url":"https://api.github.com/repos/idris-lang/Idris-dev/labels/S-Minor","name":"S-Minor","color":"d93f0b"},{"url":"https://api.github.com/repos/idris-lang/Idris-dev/labels/U-Editor%20Support","name":"U-Editor Support","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-15T16:34:29Z","updated_at":"2016-08-07T11:15:56Z","closed_at":null,"body":"Given the following Idris code:\r\n\r\n```idris\r\nmodule CaseSplitPatternVariableError\r\n\r\n%default total\r\n\r\ndata Label : Type where\r\n  MkLabel : String -> Label\r\n\r\ndata SpecialPair : Label -> Label -> Type where\r\n  MkSPair : (x : Label) -> (y : Label) -> SpecialPair x y\r\n\r\ndata InSpecialPair : Label -> SpecialPair x y -> Type where\r\n  InLeft  : InSpecialPair x (MkSPair x y)\r\n  InRight : InSpecialPair y (MkSPair x y)\r\n\r\ninSpecialPair : (l : Label)\r\n             -> (p : SpecialPair x y)\r\n             -> Maybe (InSpecialPair l p)\r\ninSpecialPair l (MkSPair x y) = ?inSpecialPair_rhs_1\r\n```\r\n\r\nIn the function `inSpecialPair`, the result of case splitting on the pattern variable `x` results in:\r\n\r\n```idris\r\ninSpecialPair : (l : Label)\r\n             -> (p : SpecialPair x y)\r\n             -> Maybe (InSpecialPair l p)\r\ninSpecialPair l (MkSPair (MkLabel (MkLabel x)) y) = ?inSpecialPair_rhs_2\r\n``` \r\n\r\nThis is obviously wrong."},"comment":{"url":"https://api.github.com/repos/idris-lang/Idris-dev/issues/comments/238076703","html_url":"https://github.com/idris-lang/Idris-dev/issues/3272#issuecomment-238076703","issue_url":"https://api.github.com/repos/idris-lang/Idris-dev/issues/3272","id":238076703,"user":{"login":"jfdm","id":331273,"avatar_url":"https://avatars.githubusercontent.com/u/331273?v=3","gravatar_id":"","url":"https://api.github.com/users/jfdm","html_url":"https://github.com/jfdm","followers_url":"https://api.github.com/users/jfdm/followers","following_url":"https://api.github.com/users/jfdm/following{/other_user}","gists_url":"https://api.github.com/users/jfdm/gists{/gist_id}","starred_url":"https://api.github.com/users/jfdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfdm/subscriptions","organizations_url":"https://api.github.com/users/jfdm/orgs","repos_url":"https://api.github.com/users/jfdm/repos","events_url":"https://api.github.com/users/jfdm/events{/privacy}","received_events_url":"https://api.github.com/users/jfdm/received_events","type":"User","site_admin":false},"created_at":"2016-08-07T11:15:56Z","updated_at":"2016-08-07T11:15:56Z","body":"@ahmadsalim oh yeah, it is not so clear...\r\n\r\nThis is a fault of Idris that gives the wrong result when asking it to case split on pattern variable `x`."}}
{"actor":{"display_login":"jfdm"}}