我曾尝试以下:哈斯克尔模式与沙箱
cabal sandbox init
然后进行以下小集团文件。
-- Initial hsource.cabal generated by cabal init. For further
-- documentation, see http://haskell.org/cabal/users-guide/
name: hsource
version: 0.1.0.0
-- synopsis:
-- description:
-- license:
license-file: LICENSE
author: abc
maintainer: abc
-- copyright:
-- category:
build-type: Simple
-- extra-source-files:
cabal-version: >=1.10
executable hsource
main-is: main.hs
other-modules:
-- other-extensions:
build-depends: base >=4.7 && <4.8, csv
hs-source-dirs: src
default-language: Haskell2010
现在我安装CSV包:
cabal install --only-dependencies
现在,当我尝试import Text.CSV
然后再C-c C-l
我收到以下错误:
Util/RandomTree.hs:7:8-15: Could not find module ‘Text.CSV’ …
Use -v to see a list of the files searched for.
Compilation failed.
所以我的问题是,如果沙箱是不支持haskell模式,或者我错过了一些步骤让他们工作?
你确定你已经启用了interactive-haskell-mode hook吗?看来你正在使用劣质的haskell模式。 – Sibi 2015-02-08 18:41:26
这个针对haskell模式的github问题可能会有帮助:https://github.com/haskell/haskell-mode/issues/253 – ErikR 2015-02-08 18:56:47