I cant import System.Directory when using stack

五迷三道 提交于 2019-12-06 03:19:20

With the information you give, I can only attempt a guess…

I think you have directory (globally) installed with cabal install directory or as a system package - this would explain runhaskell myscript.hs working.

if you use stack you have the following options.

  1. make a cabal package, add directory to the build depends section, create a stack.yaml and run stack ghci inside the project directory.

  2. use stack ghci --package=directory myscript.hs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!