{"action":"closed","issue":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/444","labels_url":"https://api.github.com/repos/commercialhaskell/stack/issues/444/labels{/name}","comments_url":"https://api.github.com/repos/commercialhaskell/stack/issues/444/comments","events_url":"https://api.github.com/repos/commercialhaskell/stack/issues/444/events","html_url":"https://github.com/commercialhaskell/stack/issues/444","id":91695196,"number":444,"title":"Executing scripts with `--package` dependencies only works the second time.","user":{"login":"soenkehahn","id":402539,"avatar_url":"https://avatars.githubusercontent.com/u/402539?v=3","gravatar_id":"","url":"https://api.github.com/users/soenkehahn","html_url":"https://github.com/soenkehahn","followers_url":"https://api.github.com/users/soenkehahn/followers","following_url":"https://api.github.com/users/soenkehahn/following{/other_user}","gists_url":"https://api.github.com/users/soenkehahn/gists{/gist_id}","starred_url":"https://api.github.com/users/soenkehahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soenkehahn/subscriptions","organizations_url":"https://api.github.com/users/soenkehahn/orgs","repos_url":"https://api.github.com/users/soenkehahn/repos","events_url":"https://api.github.com/users/soenkehahn/events{/privacy}","received_events_url":"https://api.github.com/users/soenkehahn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/commercialhaskell/stack/labels/need-confirmation","name":"need-confirmation","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/commercialhaskell/stack/milestones/5","html_url":"https://github.com/commercialhaskell/stack/milestones/0.2.0.0","labels_url":"https://api.github.com/repos/commercialhaskell/stack/milestones/5/labels","id":1166824,"number":5,"title":"0.2.0.0","description":"Arbitrary date chosen, just to get the milestones to order nicely","creator":{"login":"snoyberg","id":49415,"avatar_url":"https://avatars.githubusercontent.com/u/49415?v=3","gravatar_id":"","url":"https://api.github.com/users/snoyberg","html_url":"https://github.com/snoyberg","followers_url":"https://api.github.com/users/snoyberg/followers","following_url":"https://api.github.com/users/snoyberg/following{/other_user}","gists_url":"https://api.github.com/users/snoyberg/gists{/gist_id}","starred_url":"https://api.github.com/users/snoyberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snoyberg/subscriptions","organizations_url":"https://api.github.com/users/snoyberg/orgs","repos_url":"https://api.github.com/users/snoyberg/repos","events_url":"https://api.github.com/users/snoyberg/events{/privacy}","received_events_url":"https://api.github.com/users/snoyberg/received_events","type":"User","site_admin":false},"open_issues":40,"closed_issues":46,"state":"open","created_at":"2015-06-16T14:23:31Z","updated_at":"2015-06-30T03:18:45Z","due_on":"2015-07-12T21:00:00Z","closed_at":null},"comments":3,"created_at":"2015-06-29T04:52:47Z","updated_at":"2015-06-30T03:18:45Z","closed_at":"2015-06-30T03:18:45Z","body":"## Steps to reproduce\r\n\r\n1. Create a file `Test.hs`:\r\n``` haskell\r\nimport Safe\r\n\r\nmain :: IO ()\r\nmain = do\r\n  print $ headMay ([] :: [Int])\r\n```\r\n2. Run this in a shell:\r\n``` shell\r\n$ rm -rf ~/.stack\r\n$ stack --resolver lts-2.9 --install-ghc runghc --package safe Test.hs\r\nDownloaded lts-2.9 build plan.\r\nCaching build plan\r\nFetched package index.\r\nPopulated index cache.\r\nsafe-0.3.9: download\r\nsafe-0.3.9: configure\r\nsafe-0.3.9: build\r\nsafe-0.3.9: install\r\n\r\nTest.hs:2:8:\r\n    Could not find module ‘Safe’\r\n    Use -v to see a list of the files searched for.\r\n$ stack --resolver lts-2.9 --install-ghc runghc --package safe Test.hs\r\nNothing\r\n$ stack --version\r\nVersion 0.1.1.0, Git revision fe18e81c5d82e876b6837506b4a8c1ab518caaf9\r\n```\r\n\r\n## Expected\r\n\r\nIt should work the first time."}}