2014-01-10 38 views
4
cabal sandbox init 
cabal install haskeline 
... installs successfully ... 

ghci 
Prelude> :module +System.Console.Haskeline 

<no location info>: 
    Could not find module `System.Console.Haskeline' 

ghc-pkg list haskeline 
.. not found .. 

我必须做什么让haskeline可以使用cabal沙箱?如果我安装haskeline正常(无沙箱),它是好的(GHC-PKG列表haskeline - 发现了它)。cabal沙箱+ haskeline

回答

3

要么使用cabal repl像约瑟夫提到的,也可以明确地传递包分贝GHCI外壳相对于当前的工作目录。

ghci -no-user-package-db -package-db .cabal-sandbox/*-packages.conf.d YourModule.hs 

建议您只使用cabal。

1

为了让ghci使用本地沙箱,您必须(a)设置my-project.cabal文件和(b)使用cabal repl