{"action":"created","issue":{"url":"https://api.github.com/repos/stripe/rainier/issues/243","repository_url":"https://api.github.com/repos/stripe/rainier","labels_url":"https://api.github.com/repos/stripe/rainier/issues/243/labels{/name}","comments_url":"https://api.github.com/repos/stripe/rainier/issues/243/comments","events_url":"https://api.github.com/repos/stripe/rainier/issues/243/events","html_url":"https://github.com/stripe/rainier/pull/243","id":372087900,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0Mzg4NDA1","number":243,"title":"Better types for IR","user":{"login":"avibryant","id":9892,"node_id":"MDQ6VXNlcjk4OTI=","avatar_url":"https://avatars1.githubusercontent.com/u/9892?v=4","gravatar_id":"","url":"https://api.github.com/users/avibryant","html_url":"https://github.com/avibryant","followers_url":"https://api.github.com/users/avibryant/followers","following_url":"https://api.github.com/users/avibryant/following{/other_user}","gists_url":"https://api.github.com/users/avibryant/gists{/gist_id}","starred_url":"https://api.github.com/users/avibryant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avibryant/subscriptions","organizations_url":"https://api.github.com/users/avibryant/orgs","repos_url":"https://api.github.com/users/avibryant/repos","events_url":"https://api.github.com/users/avibryant/events{/privacy}","received_events_url":"https://api.github.com/users/avibryant/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"mio-stripe","id":21321145,"node_id":"MDQ6VXNlcjIxMzIxMTQ1","avatar_url":"https://avatars2.githubusercontent.com/u/21321145?v=4","gravatar_id":"","url":"https://api.github.com/users/mio-stripe","html_url":"https://github.com/mio-stripe","followers_url":"https://api.github.com/users/mio-stripe/followers","following_url":"https://api.github.com/users/mio-stripe/following{/other_user}","gists_url":"https://api.github.com/users/mio-stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/mio-stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mio-stripe/subscriptions","organizations_url":"https://api.github.com/users/mio-stripe/orgs","repos_url":"https://api.github.com/users/mio-stripe/repos","events_url":"https://api.github.com/users/mio-stripe/events{/privacy}","received_events_url":"https://api.github.com/users/mio-stripe/received_events","type":"User","site_admin":false},"assignees":[{"login":"mio-stripe","id":21321145,"node_id":"MDQ6VXNlcjIxMzIxMTQ1","avatar_url":"https://avatars2.githubusercontent.com/u/21321145?v=4","gravatar_id":"","url":"https://api.github.com/users/mio-stripe","html_url":"https://github.com/mio-stripe","followers_url":"https://api.github.com/users/mio-stripe/followers","following_url":"https://api.github.com/users/mio-stripe/following{/other_user}","gists_url":"https://api.github.com/users/mio-stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/mio-stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mio-stripe/subscriptions","organizations_url":"https://api.github.com/users/mio-stripe/orgs","repos_url":"https://api.github.com/users/mio-stripe/repos","events_url":"https://api.github.com/users/mio-stripe/events{/privacy}","received_events_url":"https://api.github.com/users/mio-stripe/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-10-19T19:31:27Z","updated_at":"2018-10-19T19:34:34Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/stripe/rainier/pulls/243","html_url":"https://github.com/stripe/rainier/pull/243","diff_url":"https://github.com/stripe/rainier/pull/243.diff","patch_url":"https://github.com/stripe/rainier/pull/243.patch"},"body":"This is a large diff because some things get renamed, but a relatively simple idea. The `IR` trait was not properly capturing as much structure as actually existed in the expression trees, and this PR tightens up the types a bit to fix that. Specifically:\r\n\r\n* The `IR` trait has been narrowed in focus to only cover the nodes that operate on other values: currently `BinaryIR`, `UnaryIR`, and `IfIR`. There's probably a better system of names for this  but keeping it reduced the size of this diff.\r\n* The main top-level trait is now called `Expr` instead of `IR`. In general, things should now be dealing with `Expr` values rather than `IR` which are now more of an internal implementation detail.\r\n* Under `Expr` is `Ref`, which still has the same subtypes as before.\r\n* The only other `Expr` is `VarDef`. It holds onto an `IR` on its right-hand side. (This illuminates what it means for something to be `IR`: \"an operation expensive enough to be worth caching in a var\").\r\n* To close the loop, the recursive members of the IR nodes are `Expr` values.\r\n\r\nWe also pulled `MethodDef` out of this hierarchy entirely since it's really a separate thing, and needed to add in a `NoOp` unary op to paper over an edge case.\r\n\r\nThe actual logic everywhere should be unchanged, it's just been adapted to the new types."},"comment":{"url":"https://api.github.com/repos/stripe/rainier/issues/comments/431474941","html_url":"https://github.com/stripe/rainier/pull/243#issuecomment-431474941","issue_url":"https://api.github.com/repos/stripe/rainier/issues/243","id":431474941,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTQ3NDk0MQ==","user":{"login":"avibryant","id":9892,"node_id":"MDQ6VXNlcjk4OTI=","avatar_url":"https://avatars1.githubusercontent.com/u/9892?v=4","gravatar_id":"","url":"https://api.github.com/users/avibryant","html_url":"https://github.com/avibryant","followers_url":"https://api.github.com/users/avibryant/followers","following_url":"https://api.github.com/users/avibryant/following{/other_user}","gists_url":"https://api.github.com/users/avibryant/gists{/gist_id}","starred_url":"https://api.github.com/users/avibryant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avibryant/subscriptions","organizations_url":"https://api.github.com/users/avibryant/orgs","repos_url":"https://api.github.com/users/avibryant/repos","events_url":"https://api.github.com/users/avibryant/events{/privacy}","received_events_url":"https://api.github.com/users/avibryant/received_events","type":"User","site_admin":false},"created_at":"2018-10-19T19:34:34Z","updated_at":"2018-10-19T19:34:34Z","author_association":"COLLABORATOR","body":"cc @gkossakowski in case you want to take a look"}}
{"actor":{"display_login":"avibryant"}}