{"action":"closed","issue":{"url":"https://api.github.com/repos/purescript/purescript/issues/1706","labels_url":"https://api.github.com/repos/purescript/purescript/issues/1706/labels{/name}","comments_url":"https://api.github.com/repos/purescript/purescript/issues/1706/comments","events_url":"https://api.github.com/repos/purescript/purescript/issues/1706/events","html_url":"https://github.com/purescript/purescript/issues/1706","id":121876946,"number":1706,"title":"Runtime Type Error when defining data constructor with the same name as a type in another file","user":{"login":"soupi","id":8547573,"avatar_url":"https://avatars.githubusercontent.com/u/8547573?v=3","gravatar_id":"","url":"https://api.github.com/users/soupi","html_url":"https://github.com/soupi","followers_url":"https://api.github.com/users/soupi/followers","following_url":"https://api.github.com/users/soupi/following{/other_user}","gists_url":"https://api.github.com/users/soupi/gists{/gist_id}","starred_url":"https://api.github.com/users/soupi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soupi/subscriptions","organizations_url":"https://api.github.com/users/soupi/orgs","repos_url":"https://api.github.com/users/soupi/repos","events_url":"https://api.github.com/users/soupi/events{/privacy}","received_events_url":"https://api.github.com/users/soupi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/purescript/purescript/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/purescript/purescript/milestones/11","html_url":"https://github.com/purescript/purescript/milestones/0.8.0","labels_url":"https://api.github.com/repos/purescript/purescript/milestones/11/labels","id":1073621,"number":11,"title":"0.8.0","description":"Focus areas:\r\n\r\n- Bug fixes\r\n- Performance\r\n- Improving error messages\r\n\r\nEverything else is being bumped to 0.9.","creator":{"login":"paf31","id":630306,"avatar_url":"https://avatars.githubusercontent.com/u/630306?v=3","gravatar_id":"","url":"https://api.github.com/users/paf31","html_url":"https://github.com/paf31","followers_url":"https://api.github.com/users/paf31/followers","following_url":"https://api.github.com/users/paf31/following{/other_user}","gists_url":"https://api.github.com/users/paf31/gists{/gist_id}","starred_url":"https://api.github.com/users/paf31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paf31/subscriptions","organizations_url":"https://api.github.com/users/paf31/orgs","repos_url":"https://api.github.com/users/paf31/repos","events_url":"https://api.github.com/users/paf31/events{/privacy}","received_events_url":"https://api.github.com/users/paf31/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":159,"state":"open","created_at":"2015-04-18T23:12:02Z","updated_at":"2015-12-12T20:57:20Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2015-12-12T20:09:06Z","updated_at":"2015-12-12T20:57:20Z","closed_at":"2015-12-12T20:57:20Z","body":"for example, run `pulp init` and add these files to the src folder:\r\n\r\nMain.purs:\r\n\r\n```purs\r\nmodule Main where\r\n\r\nimport Bug \r\n\r\nmain = do\r\n  action buggy\r\n\r\ndata Buggy\r\n  = Bug Bug\r\n```\r\n\r\nBug.purs:\r\n\r\n```purs\r\nmodule Bug where\r\n\r\nimport Prelude\r\nimport Control.Monad.Eff\r\nimport Control.Monad.Eff.Console\r\n\r\ntype Bug = { str :: String }\r\n\r\nbuggy :: Bug \r\nbuggy = { str:  \"bug\" }\r\n\r\naction :: Bug -> Eff _ Unit\r\naction b = do\r\n  log b.str\r\n  pure unit\r\n```\r\n\r\nResult:\r\n\r\n```sh\r\n➜  bug  pulp run  \r\n* Building project in /Users/suppi/code/purescript/bug\r\npsc: No files found using pattern: src/**/*.js\r\n* Build successful.\r\n/Users/suppi/code/purescript/bug/output/Main/index.js:13\r\nvar main = Bug.action(Bug.buggy);\r\n               ^\r\nTypeError: undefined is not a function\r\n    at Object.<anonymous> (/Users/suppi/code/purescript/bug/output/Main/index.js:13:16)\r\n    at Module._compile (module.js:460:26)\r\n    at Object.Module._extensions..js (module.js:478:10)\r\n    at Module.load (module.js:355:32)\r\n    at Function.Module._load (module.js:310:12)\r\n    at Module.require (module.js:365:17)\r\n    at require (module.js:384:17)\r\n    at Object.<anonymous> (/private/var/folders/bl/1z7yj51d295966jmb9x2_n7r0000gn/T/pulp-run1151112-2972-1wfq2ka.js:1:63)\r\n    at Module._compile (module.js:460:26)\r\n    at Object.Module._extensions..js (module.js:478:10)\r\n* ERROR: Subcommand terminated with error code 1\r\n```"}}