sleepynate
sleepynate

Reputation: 8036

HUnit not importing on Mac

On a fresh install of Haskell Platform for Max OSX, the following code fails on import Test.HUnit when run using the runghc interpreter.

{--
 - Save this file as Main.hs and run with % runghc Main.hs
 -}

module Main where

import Test.HUnit

derp = test [ "a silly test" ~: 'a' ~=? 'a' ]
tests = TestList [ derp ]

main::IO()
main = (runTestTT tests) >>= (\x -> putStrLn $ show x)

However, when using ghci, doing a simple import Test.HUnit works just fine.

How can I resolve this discrepancy between ghc from the command line and the ghci REPL?

Upvotes: 3

Views: 1040

Answers (1)

sleepynate
sleepynate

Reputation: 8036

Reboot the machine. Not sure whether it's paths not containing the right directories or something else, but a fresh start after install seems to have resolved it.

Upvotes: 0

Related Questions