如何在Windows上安装QuickCheck?

时间:2018-09-18 21:14:00

标签: haskell quickcheck

我使用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

我该如何解决?

1 个答案:

答案 0 :(得分:-1)

此处可能没有足够的信息来帮助您设置沙盒或启动GHCi,以使人们为您提供答案。我可以为您提供一种可以在Stack上使用的方法,但是:

$ stack ghci --package QuickCheck
> import Test.QuickCheck