{"action":"created","issue":{"url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1226","labels_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1226/labels{/name}","comments_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1226/comments","events_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1226/events","html_url":"https://github.com/elm-lang/elm-compiler/issues/1226","id":120974173,"number":1226,"title":"Runtime error due to forgotten name normalization, probably in tail call optimization","user":{"login":"jvoigtlaender","id":5853832,"avatar_url":"https://avatars.githubusercontent.com/u/5853832?v=3","gravatar_id":"","url":"https://api.github.com/users/jvoigtlaender","html_url":"https://github.com/jvoigtlaender","followers_url":"https://api.github.com/users/jvoigtlaender/followers","following_url":"https://api.github.com/users/jvoigtlaender/following{/other_user}","gists_url":"https://api.github.com/users/jvoigtlaender/gists{/gist_id}","starred_url":"https://api.github.com/users/jvoigtlaender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvoigtlaender/subscriptions","organizations_url":"https://api.github.com/users/jvoigtlaender/orgs","repos_url":"https://api.github.com/users/jvoigtlaender/repos","events_url":"https://api.github.com/users/jvoigtlaender/events{/privacy}","received_events_url":"https://api.github.com/users/jvoigtlaender/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-08T10:00:25Z","updated_at":"2015-12-08T10:06:14Z","closed_at":null,"body":"While this program works:\r\n```elm\r\nimport Html\r\n\r\ngo n = if n > 0 then go (n-1) else 1\r\n\r\nmain = Html.text (toString (go 5))\r\n```\r\nthis one doesn't:\r\n```elm\r\nimport Html\r\n\r\ngo n' = if n' > 0 then go (n'-1) else 1\r\n\r\nmain = Html.text (toString (go 5))\r\n```\r\n(Check at http://elm-lang.org/try)\r\n\r\nIt appears that somewhere during tail call optimization, the name `n'` is not properly escaped, so the `'` is interpreted as start of a string literal.\r\n\r\n@evancz or @JoeyEremondi, does this ring a bell with you?"},"comment":{"url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/comments/162838108","html_url":"https://github.com/elm-lang/elm-compiler/issues/1226#issuecomment-162838108","issue_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1226","id":162838108,"user":{"login":"jvoigtlaender","id":5853832,"avatar_url":"https://avatars.githubusercontent.com/u/5853832?v=3","gravatar_id":"","url":"https://api.github.com/users/jvoigtlaender","html_url":"https://github.com/jvoigtlaender","followers_url":"https://api.github.com/users/jvoigtlaender/followers","following_url":"https://api.github.com/users/jvoigtlaender/following{/other_user}","gists_url":"https://api.github.com/users/jvoigtlaender/gists{/gist_id}","starred_url":"https://api.github.com/users/jvoigtlaender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvoigtlaender/subscriptions","organizations_url":"https://api.github.com/users/jvoigtlaender/orgs","repos_url":"https://api.github.com/users/jvoigtlaender/repos","events_url":"https://api.github.com/users/jvoigtlaender/events{/privacy}","received_events_url":"https://api.github.com/users/jvoigtlaender/received_events","type":"User","site_admin":false},"created_at":"2015-12-08T10:06:14Z","updated_at":"2015-12-08T10:06:14Z","body":"```js\r\nElm.Main = Elm.Main || {};\r\nElm.Main.make = function (_elm) {\r\n   \"use strict\";\r\n   _elm.Main = _elm.Main || {};\r\n   if (_elm.Main.values) return _elm.Main.values;\r\n   var _U = Elm.Native.Utils.make(_elm),\r\n   $Basics = Elm.Basics.make(_elm),\r\n   $Debug = Elm.Debug.make(_elm),\r\n   $Html = Elm.Html.make(_elm),\r\n   $List = Elm.List.make(_elm),\r\n   $Maybe = Elm.Maybe.make(_elm),\r\n   $Result = Elm.Result.make(_elm),\r\n   $Signal = Elm.Signal.make(_elm);\r\n   var _op = {};\r\n   var go = function (n$) {\r\n      go: while (true) if (_U.cmp(n$,0) > 0) {\r\n            var _v0 = n$ - 1;\r\n            n' = _v0;\r\n            continue go;\r\n         } else return 1;\r\n   };\r\n   var main = $Html.text($Basics.toString(go(5)));\r\n   return _elm.Main.values = {_op: _op,go: go,main: main};\r\n};\r\n```"}}