{"action":"created","issue":{"url":"https://api.github.com/repos/ucsd-progsys/liquidhaskell/issues/612","repository_url":"https://api.github.com/repos/ucsd-progsys/liquidhaskell","labels_url":"https://api.github.com/repos/ucsd-progsys/liquidhaskell/issues/612/labels{/name}","comments_url":"https://api.github.com/repos/ucsd-progsys/liquidhaskell/issues/612/comments","events_url":"https://api.github.com/repos/ucsd-progsys/liquidhaskell/issues/612/events","html_url":"https://github.com/ucsd-progsys/liquidhaskell/issues/612","id":133885991,"number":612,"title":"Weird import behavior when using stack","user":{"login":"rpglover64","id":233689,"avatar_url":"https://avatars.githubusercontent.com/u/233689?v=3","gravatar_id":"","url":"https://api.github.com/users/rpglover64","html_url":"https://github.com/rpglover64","followers_url":"https://api.github.com/users/rpglover64/followers","following_url":"https://api.github.com/users/rpglover64/following{/other_user}","gists_url":"https://api.github.com/users/rpglover64/gists{/gist_id}","starred_url":"https://api.github.com/users/rpglover64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpglover64/subscriptions","organizations_url":"https://api.github.com/users/rpglover64/orgs","repos_url":"https://api.github.com/users/rpglover64/repos","events_url":"https://api.github.com/users/rpglover64/events{/privacy}","received_events_url":"https://api.github.com/users/rpglover64/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ucsd-progsys/liquidhaskell/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/ucsd-progsys/liquidhaskell/labels/modules","name":"modules","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-16T04:59:21Z","updated_at":"2016-02-16T05:23:04Z","closed_at":null,"body":"Consider two simple files in a stack project:\r\n\r\n`FileA.hs`:\r\n```haskell\r\nmodule FileA where\r\nimport Data.List (foldl')\r\n```\r\n\r\n`FileB.hs`:\r\n```haskell\r\nmodule FileB where\r\nimport Data.List\r\nfoo = foldl'\r\n```\r\n\r\nRunning `stack exec -- liquid [...]` gives the following output:\r\n```\r\n% stack exec -- liquid FileA.hs\r\nLiquidHaskell Copyright 2009-15 Regents of the University of California. All Rights Reserved.\r\n\r\n\r\n**** DONE:  annotate ***********************************************************\r\n\r\n\r\n**** ERROR: Invalid Source *****************************************************\r\n\r\n\r\n FileA.hs:2:19-24: Error: GHC Error\r\n     Module ‘Data.List’ does not export ‘foldl'’\r\n```\r\n```\r\n% stack exec -- liquid FileB.hs\r\nLiquidHaskell Copyright 2009-15 Regents of the University of California. All Rights Reserved.\r\n\r\n\r\n**** DONE:  annotate ***********************************************************\r\n\r\n\r\n**** ERROR: Invalid Source *****************************************************\r\n\r\n\r\n FileB.hs:3:7-12: Error: GHC Error\r\n     Not in scope: ‘foldl'’\r\n```\r\n\r\nAs far as I can tell, `liquid` is opening the appropriate interface files (at least according to `strace`), but not using them properly (whatever that means)"},"comment":{"url":"https://api.github.com/repos/ucsd-progsys/liquidhaskell/issues/comments/184526663","html_url":"https://github.com/ucsd-progsys/liquidhaskell/issues/612#issuecomment-184526663","issue_url":"https://api.github.com/repos/ucsd-progsys/liquidhaskell/issues/612","id":184526663,"user":{"login":"gridaphobe","id":201997,"avatar_url":"https://avatars.githubusercontent.com/u/201997?v=3","gravatar_id":"","url":"https://api.github.com/users/gridaphobe","html_url":"https://github.com/gridaphobe","followers_url":"https://api.github.com/users/gridaphobe/followers","following_url":"https://api.github.com/users/gridaphobe/following{/other_user}","gists_url":"https://api.github.com/users/gridaphobe/gists{/gist_id}","starred_url":"https://api.github.com/users/gridaphobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gridaphobe/subscriptions","organizations_url":"https://api.github.com/users/gridaphobe/orgs","repos_url":"https://api.github.com/users/gridaphobe/repos","events_url":"https://api.github.com/users/gridaphobe/events{/privacy}","received_events_url":"https://api.github.com/users/gridaphobe/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T05:23:04Z","updated_at":"2016-02-16T05:23:04Z","body":"Very strange.. These are both GHC errors, and we just pass a few `-i` flags to GHC. Does `stack exec -- ghc FileA.hs` work?\r\n\r\nAlso, are you using the latest hackage release or master? Thanks!"}}