{"action":"created","issue":{"url":"https://api.github.com/repos/ucsd-progsys/liquidhaskell/issues/287","labels_url":"https://api.github.com/repos/ucsd-progsys/liquidhaskell/issues/287/labels{/name}","comments_url":"https://api.github.com/repos/ucsd-progsys/liquidhaskell/issues/287/comments","events_url":"https://api.github.com/repos/ucsd-progsys/liquidhaskell/issues/287/events","html_url":"https://github.com/ucsd-progsys/liquidhaskell/issues/287","id":51858627,"number":287,"title":"Bad error messages in expression type parameters","user":{"login":"spinda","id":7958605,"avatar_url":"https://avatars.githubusercontent.com/u/7958605?v=3","gravatar_id":"","url":"https://api.github.com/users/spinda","html_url":"https://github.com/spinda","followers_url":"https://api.github.com/users/spinda/followers","following_url":"https://api.github.com/users/spinda/following{/other_user}","gists_url":"https://api.github.com/users/spinda/gists{/gist_id}","starred_url":"https://api.github.com/users/spinda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinda/subscriptions","organizations_url":"https://api.github.com/users/spinda/orgs","repos_url":"https://api.github.com/users/spinda/repos","events_url":"https://api.github.com/users/spinda/events{/privacy}","received_events_url":"https://api.github.com/users/spinda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-12-12T22:05:43Z","updated_at":"2015-01-16T08:05:58Z","closed_at":null,"body":"Expression type parameters can be abused in various ways to produce strange behavior.\r\n\r\nYou can use them to refer to non-existent type parameters:\r\n\r\nhttp://goto.ucsd.edu:8090/index.html#?demo=permalink%2F1418421723.hs\r\n\r\n...which causes a strange crash in plugHoles when used as a function signature:\r\n\r\nhttp://goto.ucsd.edu:8090/index.html#?demo=permalink%2F1418421674.hs\r\n\r\nYou can also use them to create cyclic type aliases:\r\n\r\nhttp://goto.ucsd.edu:8090/index.html#?demo=permalink%2F1418421814.hs\r\n\r\n...which causes a crash in the same area of plugHoles when used as a signature:\r\n\r\nhttp://goto.ucsd.edu:8090/index.html#?demo=permalink%2F1418421839.hs\r\n\r\n_______\r\n\r\nThe problem area is in [expandRTApp in Bare.hs](https://github.com/ucsd-progsys/liquidhaskell/blob/master/src/Language/Haskell/Liquid/Bare.hs#L422), where expression type parameters are handled differently than regular type parameters, and don't have any checks performed on them. [exprArg](https://github.com/ucsd-progsys/liquidhaskell/blob/master/src/Language/Haskell/Liquid/Bare.hs#L440) is involved here, which is marked as a \"HORRIBLE HACK\", likely the cause of the issue."},"comment":{"url":"https://api.github.com/repos/ucsd-progsys/liquidhaskell/issues/comments/70220327","html_url":"https://github.com/ucsd-progsys/liquidhaskell/issues/287#issuecomment-70220327","issue_url":"https://api.github.com/repos/ucsd-progsys/liquidhaskell/issues/287","id":70220327,"user":{"login":"spinda","id":7958605,"avatar_url":"https://avatars.githubusercontent.com/u/7958605?v=3","gravatar_id":"","url":"https://api.github.com/users/spinda","html_url":"https://github.com/spinda","followers_url":"https://api.github.com/users/spinda/followers","following_url":"https://api.github.com/users/spinda/following{/other_user}","gists_url":"https://api.github.com/users/spinda/gists{/gist_id}","starred_url":"https://api.github.com/users/spinda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinda/subscriptions","organizations_url":"https://api.github.com/users/spinda/orgs","repos_url":"https://api.github.com/users/spinda/repos","events_url":"https://api.github.com/users/spinda/events{/privacy}","received_events_url":"https://api.github.com/users/spinda/received_events","type":"User","site_admin":false},"created_at":"2015-01-16T08:05:58Z","updated_at":"2015-01-16T08:05:58Z","body":"The pull request that I just submitted doesn't address this, but I have partial work done on a future PR that will."}}