Consider the following script:
#!/usr/bin/env stack
-- stack --resolver lts-3.10 --install-ghc runghc
import Safe
main :: IO ()
main = do
print $ headMay "foo"
This script depends on the package safe. It currently works without problems on my machine, but only because I already have the package safe cached for the specified snapshot. On machines where the package is not installed it fails with
Test.hs:4:8:
Could not find module ‘Safe’
Use -v to see a list of the files searched for.
It would be great if stack scripts would either fail or succeed independent of cache state. Then I could create stack scripts on my machine, copy them to different machines and be fairly sure that they will run.
Consider the following script:
This script depends on the package
safe. It currently works without problems on my machine, but only because I already have the packagesafecached for the specified snapshot. On machines where the package is not installed it fails withIt would be great if
stackscripts would either fail or succeed independent of cache state. Then I could createstackscripts on my machine, copy them to different machines and be fairly sure that they will run.