{"action":"created","issue":{"url":"https://api.github.com/repos/idris-hackers/idris-mode/issues/476","repository_url":"https://api.github.com/repos/idris-hackers/idris-mode","labels_url":"https://api.github.com/repos/idris-hackers/idris-mode/issues/476/labels{/name}","comments_url":"https://api.github.com/repos/idris-hackers/idris-mode/issues/476/comments","events_url":"https://api.github.com/repos/idris-hackers/idris-mode/issues/476/events","html_url":"https://github.com/idris-hackers/idris-mode/issues/476","id":314358955,"number":476,"title":"Idris mode inferring unapplied function types","user":{"login":"Abhiroop","id":3116588,"avatar_url":"https://avatars3.githubusercontent.com/u/3116588?v=4","gravatar_id":"","url":"https://api.github.com/users/Abhiroop","html_url":"https://github.com/Abhiroop","followers_url":"https://api.github.com/users/Abhiroop/followers","following_url":"https://api.github.com/users/Abhiroop/following{/other_user}","gists_url":"https://api.github.com/users/Abhiroop/gists{/gist_id}","starred_url":"https://api.github.com/users/Abhiroop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abhiroop/subscriptions","organizations_url":"https://api.github.com/users/Abhiroop/orgs","repos_url":"https://api.github.com/users/Abhiroop/repos","events_url":"https://api.github.com/users/Abhiroop/events{/privacy}","received_events_url":"https://api.github.com/users/Abhiroop/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-04-14T20:21:58Z","updated_at":"2018-04-16T14:34:55Z","closed_at":null,"author_association":"NONE","body":"For example,\r\n\r\nI am attempting this basic example:\r\n```idris\r\nplus_commutes_Z : m = plus m 0\r\nplus_commutes_Z {m = Z} = Refl\r\nplus_commutes_Z {m = (S k)} = let rec = plus_commutes_Z {m = k} in\r\n                                  rewrite sym rec in Refl\r\n\r\n\r\n\r\nplus_commutes : (n, m : Nat) -> plus n m = plus m n\r\nplus_commutes Z m = plus_commutes_Z\r\nplus_commutes (S k) m = rewrite plus_commutes k m in ?plus_commutes_S\r\n```\r\n\r\nHere when I typecheck `plus_commutes_S`, when I expected\r\n\r\n```idris\r\nS (plus m k) = plus m (S k)\r\n```\r\n\r\nit is being inferred as\r\n\r\n```idris\r\n(\\replaced => S replaced = plus m (S k)) (plus m k)\r\n```\r\n\r\nI am using Idris 1.2 and spacemacs idris layer (which I assume pulls the latest version of idris mode)"},"comment":{"url":"https://api.github.com/repos/idris-hackers/idris-mode/issues/comments/381620772","html_url":"https://github.com/idris-hackers/idris-mode/issues/476#issuecomment-381620772","issue_url":"https://api.github.com/repos/idris-hackers/idris-mode/issues/476","id":381620772,"user":{"login":"david-christiansen","id":115330,"avatar_url":"https://avatars1.githubusercontent.com/u/115330?v=4","gravatar_id":"","url":"https://api.github.com/users/david-christiansen","html_url":"https://github.com/david-christiansen","followers_url":"https://api.github.com/users/david-christiansen/followers","following_url":"https://api.github.com/users/david-christiansen/following{/other_user}","gists_url":"https://api.github.com/users/david-christiansen/gists{/gist_id}","starred_url":"https://api.github.com/users/david-christiansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-christiansen/subscriptions","organizations_url":"https://api.github.com/users/david-christiansen/orgs","repos_url":"https://api.github.com/users/david-christiansen/repos","events_url":"https://api.github.com/users/david-christiansen/events{/privacy}","received_events_url":"https://api.github.com/users/david-christiansen/received_events","type":"User","site_admin":false},"created_at":"2018-04-16T14:34:55Z","updated_at":"2018-04-16T14:34:55Z","author_association":"OWNER","body":"This is going to be part of the Idris IDE protocol server. It probably needs updating - the command-line REPL also used to do this.\r\n\r\nIn the meantime, you can right-click the expression and click \"Normalize\" to reduce it."}}
{"actor":{"display_login":"david-christiansen"}}