{"action":"created","issue":{"url":"https://api.github.com/repos/HarrisonGrodin/Rewrite.jl/issues/44","repository_url":"https://api.github.com/repos/HarrisonGrodin/Rewrite.jl","labels_url":"https://api.github.com/repos/HarrisonGrodin/Rewrite.jl/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/HarrisonGrodin/Rewrite.jl/issues/44/comments","events_url":"https://api.github.com/repos/HarrisonGrodin/Rewrite.jl/issues/44/events","html_url":"https://github.com/HarrisonGrodin/Rewrite.jl/issues/44","id":354137841,"node_id":"MDU6SXNzdWUzNTQxMzc4NDE=","number":44,"title":"Spurious behaviour with custom rules","user":{"login":"MasonProtter","id":29157027,"node_id":"MDQ6VXNlcjI5MTU3MDI3","avatar_url":"https://avatars1.githubusercontent.com/u/29157027?v=4","gravatar_id":"","url":"https://api.github.com/users/MasonProtter","html_url":"https://github.com/MasonProtter","followers_url":"https://api.github.com/users/MasonProtter/followers","following_url":"https://api.github.com/users/MasonProtter/following{/other_user}","gists_url":"https://api.github.com/users/MasonProtter/gists{/gist_id}","starred_url":"https://api.github.com/users/MasonProtter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MasonProtter/subscriptions","organizations_url":"https://api.github.com/users/MasonProtter/orgs","repos_url":"https://api.github.com/users/MasonProtter/repos","events_url":"https://api.github.com/users/MasonProtter/events{/privacy}","received_events_url":"https://api.github.com/users/MasonProtter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-26T23:17:12Z","updated_at":"2018-08-26T23:31:15Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I noticed today that the following does not behave as I'd expect:\r\n```julia\r\njulia> Rewrite.normalize((@term 1 + x + 3), @term RULES [1 + x => y])\r\n@term(y)\r\n```\r\nthis should return `@term(y + 3)`. Did I do something in defining the rule? "},"comment":{"url":"https://api.github.com/repos/HarrisonGrodin/Rewrite.jl/issues/comments/416081020","html_url":"https://github.com/HarrisonGrodin/Rewrite.jl/issues/44#issuecomment-416081020","issue_url":"https://api.github.com/repos/HarrisonGrodin/Rewrite.jl/issues/44","id":416081020,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjA4MTAyMA==","user":{"login":"HarrisonGrodin","id":25474424,"node_id":"MDQ6VXNlcjI1NDc0NDI0","avatar_url":"https://avatars0.githubusercontent.com/u/25474424?v=4","gravatar_id":"","url":"https://api.github.com/users/HarrisonGrodin","html_url":"https://github.com/HarrisonGrodin","followers_url":"https://api.github.com/users/HarrisonGrodin/followers","following_url":"https://api.github.com/users/HarrisonGrodin/following{/other_user}","gists_url":"https://api.github.com/users/HarrisonGrodin/gists{/gist_id}","starred_url":"https://api.github.com/users/HarrisonGrodin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HarrisonGrodin/subscriptions","organizations_url":"https://api.github.com/users/HarrisonGrodin/orgs","repos_url":"https://api.github.com/users/HarrisonGrodin/repos","events_url":"https://api.github.com/users/HarrisonGrodin/events{/privacy}","received_events_url":"https://api.github.com/users/HarrisonGrodin/received_events","type":"User","site_admin":false},"created_at":"2018-08-26T23:31:15Z","updated_at":"2018-08-26T23:31:15Z","author_association":"OWNER","body":"There are two issues with this scenario.\r\n\r\nFirst, the rule doesn't quite make sense - it says that (1 + an arbitrary value x) should be rewritten to (an arbitrary value y). Having variables on the right side that don't appear on the left should probably be an error, actually. This can currently be resolved though the use of constant functions, namely [x() + 1 -> y()].\r\n\r\nHowever, you're right that the functionality for normalizing subexpressions of flat terms is currently broken - see #21."}}
{"actor":{"display_login":"HarrisonGrodin"}}