简体   繁体   中英

Cannot import HUnit into ghci

I've just installed HUnit, and want to import it into 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.

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 . 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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