{"action":"closed","issue":{"url":"https://api.github.com/repos/purescript/purescript/issues/1792","labels_url":"https://api.github.com/repos/purescript/purescript/issues/1792/labels{/name}","comments_url":"https://api.github.com/repos/purescript/purescript/issues/1792/comments","events_url":"https://api.github.com/repos/purescript/purescript/issues/1792/events","html_url":"https://github.com/purescript/purescript/issues/1792","id":124763262,"number":1792,"title":"Namespace clash between Modules and Data Constructors","user":{"login":"csabahruska","id":877489,"avatar_url":"https://avatars.githubusercontent.com/u/877489?v=3","gravatar_id":"","url":"https://api.github.com/users/csabahruska","html_url":"https://github.com/csabahruska","followers_url":"https://api.github.com/users/csabahruska/followers","following_url":"https://api.github.com/users/csabahruska/following{/other_user}","gists_url":"https://api.github.com/users/csabahruska/gists{/gist_id}","starred_url":"https://api.github.com/users/csabahruska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csabahruska/subscriptions","organizations_url":"https://api.github.com/users/csabahruska/orgs","repos_url":"https://api.github.com/users/csabahruska/repos","events_url":"https://api.github.com/users/csabahruska/events{/privacy}","received_events_url":"https://api.github.com/users/csabahruska/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/purescript/purescript/labels/duplicate","name":"duplicate","color":"cccccc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-04T13:57:56Z","updated_at":"2016-01-04T14:24:55Z","closed_at":"2016-01-04T14:24:55Z","body":"version: psc 0.7.6.1\r\n\r\nThis code should work but it crashes:\r\n\r\nfile: Linear.purs\r\n```purescript\r\nmodule Linear where\r\nimport Prelude\r\n\r\nhello = \"Hello\"\r\n```\r\n\r\nfile: Main.purs\r\n```purescript\r\nmodule Main where\r\n\r\nimport Prelude\r\nimport Control.Monad.Eff\r\nimport Control.Monad.Eff.Console\r\nimport Linear\r\n\r\ndata OK = Linear2\r\ndata BAD = Linear\r\n\r\nmain :: forall e. Eff (console :: CONSOLE | e) Unit\r\nmain = do\r\n  log hello\r\n```\r\n\r\nproblem:\r\n```javascript\r\n  var Linear = PS[\"Linear\"];.....\r\n  var Linear2 = (function () {\r\n      function Linear2() {\r\n\r\n      };\r\n      Linear2.value = new Linear2();\r\n      return Linear2;\r\n  })();\r\n  var Linear = (function () {\r\n      function Linear() {\r\n\r\n      };\r\n      Linear.value = new Linear();\r\n      return Linear;\r\n  })();\r\n  var main = Control_Monad_Eff_Console.log(Linear.hello);\r\n```\r\n\r\n\r\n[module_and_data_namespace_bug.zip](https://github.com/purescript/purescript/files/77242/module_and_data_namespace_bug.zip)"}}