{"action":"created","issue":{"url":"https://api.github.com/repos/mvdan/hint/issues/22","repository_url":"https://api.github.com/repos/mvdan/hint","labels_url":"https://api.github.com/repos/mvdan/hint/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/mvdan/hint/issues/22/comments","events_url":"https://api.github.com/repos/mvdan/hint/issues/22/events","html_url":"https://github.com/mvdan/hint/issues/22","id":187312188,"number":22,"title":"Imported package modules don't have their imports","user":{"login":"MasterMastic","id":7421458,"avatar_url":"https://avatars.githubusercontent.com/u/7421458?v=3","gravatar_id":"","url":"https://api.github.com/users/MasterMastic","html_url":"https://github.com/MasterMastic","followers_url":"https://api.github.com/users/MasterMastic/followers","following_url":"https://api.github.com/users/MasterMastic/following{/other_user}","gists_url":"https://api.github.com/users/MasterMastic/gists{/gist_id}","starred_url":"https://api.github.com/users/MasterMastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MasterMastic/subscriptions","organizations_url":"https://api.github.com/users/MasterMastic/orgs","repos_url":"https://api.github.com/users/MasterMastic/repos","events_url":"https://api.github.com/users/MasterMastic/events{/privacy}","received_events_url":"https://api.github.com/users/MasterMastic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-04T11:36:59Z","updated_at":"2016-11-04T12:33:31Z","closed_at":null,"body":"I just tried to import a module from a (separate) package of mine and I'm getting errors that there are symbols that the module uses that are not in scope.\r\n\r\nI could minimize it to an extent by importing the modules that are missing in the interpreter but it's not very feasible, and I actually tried but I got name clashes when the module I'm trying to import only imports some symbols from a module, and so on. It's also very tedious with a lot of imports.\r\n\r\nI'm not sure if I hit a limitation or a bug or maybe I'm not doing something correctly."},"comment":{"url":"https://api.github.com/repos/mvdan/hint/issues/comments/258419547","html_url":"https://github.com/mvdan/hint/issues/22#issuecomment-258419547","issue_url":"https://api.github.com/repos/mvdan/hint/issues/22","id":258419547,"user":{"login":"MasterMastic","id":7421458,"avatar_url":"https://avatars.githubusercontent.com/u/7421458?v=3","gravatar_id":"","url":"https://api.github.com/users/MasterMastic","html_url":"https://github.com/MasterMastic","followers_url":"https://api.github.com/users/MasterMastic/followers","following_url":"https://api.github.com/users/MasterMastic/following{/other_user}","gists_url":"https://api.github.com/users/MasterMastic/gists{/gist_id}","starred_url":"https://api.github.com/users/MasterMastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MasterMastic/subscriptions","organizations_url":"https://api.github.com/users/MasterMastic/orgs","repos_url":"https://api.github.com/users/MasterMastic/repos","events_url":"https://api.github.com/users/MasterMastic/events{/privacy}","received_events_url":"https://api.github.com/users/MasterMastic/received_events","type":"User","site_admin":false},"created_at":"2016-11-04T12:33:31Z","updated_at":"2016-11-04T12:33:31Z","body":"Two updates:\r\nA) I found that it's not even about trying to import a module, it's about the type I `infer`/`as`. If it comes from another module, sometimes it's problematic, and sometimes it's not, e.g. below it's problematic with `text`, in my project it's problematic both with `text` and my modules in the separate package, and in my mentioned first attempt, it was completely fine with definitions that are in a separate package.\r\nB) I found one case with using `text`:\r\n\r\n```\r\nimport Data.Text (Text)\r\nimport Language.Haskell.Interpreter\r\n\r\nmain :: IO ()\r\nmain = (=<<) print . runInterpreter $ do\r\n  setImports [\"Prelude\"]\r\n  interpret \"Nothing\" (as :: Maybe Text)\r\n```\r\nFails:\r\n```\r\nghci> main\r\nLeft (WontCompile [GhcError {errMsg = \"<interactive>:3:42: error:\\n    Not in scope: type constructor or class `Text'\"}])\r\n```\r\n\r\nAs mentioned, I'm getting error with `text` in my actual project too, although I'm getting the same thing with definitions in my other package."}}
{"actor":{"display_login":"MasterMastic"}}