haskell - 无法将 HUnit 导入 ghci

标签 haskell ghci hunit

我刚刚安装了 HUnit,并想将其导入 ghci。

Prelude> import HUnit

<no location info>:
    Could not find module `HUnit':
      Use -v to see a list of the files searched for.

另外,我不确定如何使用 -v帮我。
Prelude> import -v HUnit

<interactive>:1:8: parse error on input `-'

Prelude> import -v

<interactive>:1:8: parse error on input `-'

Prelude> -v

<interactive>:1:2: Not in scope: `v'

我该如何导入它?

最佳答案

正确的模块是 Test.HUnit .导入它,它应该可以工作。

使用 -v选项,或者在命令行上指定它,例如ghci -v , 或输入 :set -v从 GHCi 内部。

关于haskell - 无法将 HUnit 导入 ghci,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7817116/

相关文章:

unit-testing - 模拟 IO 操作 : getArgs and putStrLn

exception - 优化和错误调用测试之间的交互

haskell - 秒差距没有消耗所有输入?

haskell - Haskell中反斜杠空格是什么意思

haskell -++ 和 : in haskell? 有什么区别

haskell - cabal 测试包安装期间随机 Word8 重复实例声明

haskell - Hackage 是否仅开源?

list - Haskell 回溯递归

haskell - 在 Haskell 中设置提示

haskell - 有 ghci 缩写命令列表吗?