简体   繁体   English

无法将HUnit导入ghci

[英]Cannot import HUnit into ghci

I've just installed HUnit, and want to import it into ghci. 我刚刚安装了HUnit,并希望将其导入ghci。

Prelude> import HUnit

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

Also, I'm not sure how to use the -v to help me. 另外,我不知道如何使用-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'

How can I import it? 我该如何导入它?

The correct module is Test.HUnit . 正确的模块是Test.HUnit Import that and it should work. 导入它,它应该工作。

To use the -v option, either specify it on the command line, eg ghci -v , or type :set -v from within GHCi. 要使用-v选项,请在命令行上指定它,例如ghci -v ,或者在GHCi中键入:set -v

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM