无法将HUnit导入ghci

时间:2011-10-19 05:55:45

标签: 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'

如何导入它?

1 个答案:

答案 0 :(得分:12)

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

要使用-v选项,请在命令行中指定它,例如ghci -v,或在GHCi中输入:set -v