我一直收到错误:
error:
Could not find module ‘Text.Parsec.Expr’
Use -v to see a list of the files searched for.
我有最新的haskell / ghc并运行cabal install parsec
&& stack install parsec
无论我做什么都找不到模块
编辑:
你可以发布命令行吗?你有没有在你的cabal文件中列出它? - 保罗约翰逊3分钟前
这是我第一次安装cabal所以它说它会为我生成文件。
cmd line
PA1Helper.hs:3:1: error:
Could not find module ‘Text.Parsec’
Use -v to see a list of the files searched for.
|
3 | import Text.Parsec
| ^^^^^^^^^^^^^^^^^^
PA1Helper.hs:4:1: error:
Could not find module ‘Text.Parsec.String’
Use -v to see a list of the files searched for.
|
4 | import Text.Parsec.String
| ^^^^^^^^^^^^^^^^^^^^^^^^^
PA1Helper.hs:5:1: error:
Could not find module ‘Text.Parsec.Expr’
Use -v to see a list of the files searched for.
|
5 | import Text.Parsec.Expr
| ^^^^^^^^^^^^^^^^^^^^^^^
PA1Helper.hs:6:1: error:
Could not find module ‘Text.Parsec.Token’
Use -v to see a list of the files searched for.
|
6 | import Text.Parsec.Token
| ^^^^^^^^^^^^^^^^^^^^^^^^
PA1Helper.hs:7:1: error:
Could not find module ‘Text.Parsec.Language’
Use -v to see a list of the files searched for.
|
7 | import Text.Parsec.Language
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
PA1Helper.hs:8:1: error:
Could not find module ‘Text.Parsec.Char’
Use -v to see a list of the files searched for.
|
8 | import Text.Parsec.Char
| ^^^^^^^^^^^^^^^^^^^^^^^
堆栈exec-ghc-pkg列表的输出也会有所帮助:
Cabal-1.24.2.0
array-0.5.1.1
base-4.9.1.0
binary-0.8.3.0
bytestring-0.10.8.1
containers-0.5.7.1
deepseq-1.4.2.0
directory-1.3.0.0
filepath-1.4.1.1
ghc-8.0.2
ghc-boot-8.0.2
ghc-boot-th-8.0.2
ghc-prim-0.5.0.0
ghci-8.0.2
haskeline-0.7.3.0
hoopl-3.10.2.1
hpc-0.6.0.3
integer-gmp-1.0.0.1
pretty-1.1.3.3
process-1.4.3.0
rts-1.0
template-haskell-2.11.1.0
terminfo-0.4.0.2
time-1.6.0.1
transformers-0.5.2.0
unix-2.7.2.1
xhtml-3000.2.1
/Users/hannahdeen/.stack/snapshots/x86_64-osx/lts-9.5/8.0.2/pkgdb
mtl-2.2.1
parsec-3.1.11
text-1.2.2.2
/Users/hannahdeen/.stack/global-project/.stack-work/install/x86_64-osx/lts-9.5/8.0.2/pkgdb
(no packages)