{"action":"created","issue":{"url":"https://api.github.com/repos/RedPRL/sml-redprl/issues/153","repository_url":"https://api.github.com/repos/RedPRL/sml-redprl","labels_url":"https://api.github.com/repos/RedPRL/sml-redprl/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/RedPRL/sml-redprl/issues/153/comments","events_url":"https://api.github.com/repos/RedPRL/sml-redprl/issues/153/events","html_url":"https://github.com/RedPRL/sml-redprl/issues/153","id":190864209,"number":153,"title":"Free metavars cause meaningless error message","user":{"login":"wilcoxjay","id":229924,"avatar_url":"https://avatars.githubusercontent.com/u/229924?v=3","gravatar_id":"","url":"https://api.github.com/users/wilcoxjay","html_url":"https://github.com/wilcoxjay","followers_url":"https://api.github.com/users/wilcoxjay/followers","following_url":"https://api.github.com/users/wilcoxjay/following{/other_user}","gists_url":"https://api.github.com/users/wilcoxjay/gists{/gist_id}","starred_url":"https://api.github.com/users/wilcoxjay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilcoxjay/subscriptions","organizations_url":"https://api.github.com/users/wilcoxjay/orgs","repos_url":"https://api.github.com/users/wilcoxjay/repos","events_url":"https://api.github.com/users/wilcoxjay/events{/privacy}","received_events_url":"https://api.github.com/users/wilcoxjay/received_events","type":"User","site_admin":false},"labels":[{"id":486265610,"url":"https://api.github.com/repos/RedPRL/sml-redprl/labels/A-elaborator","name":"A-elaborator","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-11-21T23:18:40Z","updated_at":"2016-11-22T01:04:28Z","closed_at":null,"body":"For example, change `#g` to `#h` in the definition of `cmp` in the [current `test.prl`](https://github.com/RedPRL/sml-redprl/blob/0b04b32b038b9cbb72ad17c7180af03be8bd12a5/test/test.prl). (And comment out `strictBoolTest` to work around #152.) You will get `Absent`  as an error message, with half-decent location information.\r\n\r\nIt would be nice if the error message was instead something like \"Unbound metavariable 'h'\".\r\n\r\nThe culprit is the [call to `lookup`](https://github.com/RedPRL/sml-typed-abts/blob/c90fc3895c7101516f833471905b3887267a4b9e/src/core/ast.fun#L113) in AST conversion in sml-typed-abts.\r\n\r\nI think a quick fix would just be to handle exceptions from `lookup` there and report the name of the unbound metavariable."},"comment":{"url":"https://api.github.com/repos/RedPRL/sml-redprl/issues/comments/262117158","html_url":"https://github.com/RedPRL/sml-redprl/issues/153#issuecomment-262117158","issue_url":"https://api.github.com/repos/RedPRL/sml-redprl/issues/153","id":262117158,"user":{"login":"jonsterling","id":55057,"avatar_url":"https://avatars.githubusercontent.com/u/55057?v=3","gravatar_id":"","url":"https://api.github.com/users/jonsterling","html_url":"https://github.com/jonsterling","followers_url":"https://api.github.com/users/jonsterling/followers","following_url":"https://api.github.com/users/jonsterling/following{/other_user}","gists_url":"https://api.github.com/users/jonsterling/gists{/gist_id}","starred_url":"https://api.github.com/users/jonsterling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonsterling/subscriptions","organizations_url":"https://api.github.com/users/jonsterling/orgs","repos_url":"https://api.github.com/users/jonsterling/repos","events_url":"https://api.github.com/users/jonsterling/events{/privacy}","received_events_url":"https://api.github.com/users/jonsterling/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T01:04:28Z","updated_at":"2016-11-22T01:04:28Z","body":"(For now you could just use `raise Fail \"the formatted error message\"` if it is not clear how to integrate this properly with RedPRL's error reporting mechanism, and we could clean it up later. Or you could have a go at doing it all the way, if it seems possible.)"}}
{"actor":{"display_login":"jonsterling"}}