我使用cabal在沙箱环境中安装QuickCheck,它看起来不错
C:\Users\yashi>cabal install QuickCheck
Resolving dependencies...
Notice: installing into a sandbox located at C:\Users\yashi\.cabal-sandbox
Downloading erf-2.0.0.0...
Downloading primitive-0.6.4.0...
Downloading random-1.1...
...
Installed QuickCheck-2.12.4但当我打开一个文件时,它显示
C:\\Users\yashi\OneDrive\Desktop\Ex1.hs:24:1: error:
Could not find module ‘Test.QuickCheck’
Use -v to see a list of the files searched for.
|
24 | import Test.QuickCheck (Property, quickCheck, (==>))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Failed, no modules loaded.
Prelude> import Test.QuickCheck我怎么才能修复它?
发布于 2018-09-25 01:55:11
这里可能没有关于如何设置沙箱或启动GHCi的足够信息,人们无法为您提供答案。不过,我可以为您提供一种适用于Stack的方法:
$ stack ghci --package QuickCheck
> import Test.QuickCheckhttps://stackoverflow.com/questions/52394677
复制相似问题