[Hat] Using Hat with HUnit
Katerina Barone-Adesi
katerinab at gmail.com
Sun Oct 8 12:49:07 EDT 2006
I'm trying to run hat on some unit tests. They use HUnit-1.0, which I
have under the tests directory, in tests/HUnit-1.0/; I've been
interpreting the tests using runhaskell.
When I run hmake -package parsec -i.. -iHUnit-1.0 RunTests;
./RunTests, everything works exactly as it does when I'm interpreting.
When I add a -hat to the options, I get the following error:
hat-trans -i.. -iHUnit-1.0 HUnit-1.0/HUnitLang.lhs
Wrote Hat/HUnit-1.0/HUnitLang.hs
/usr/bin/ghc -package parsec -i.. -iHUnit-1.0 -c -package hat -o
HUnit-1.0/Hat/HUnitLang.o HUnit-1.0/Hat/HUnitLang.hs
ghc-6.4.2: error: directory portion of "HUnit-1.0/Hat/HUnitLang.o"
does not exist (used with "-o" option.)
If I manually create HUnit-1.0/Hat:
hat-trans -i.. -iHUnit-1.0 HUnit-1.0/HUnitLang.lhs
Wrote Hat/HUnit-1.0/HUnitLang.hs
/usr/bin/ghc -package parsec -i.. -iHUnit-1.0 -c -package hat -o
HUnit-1.0/Hat/HUnitLang.o HUnit-1.0/Hat/HUnitLang.hs
ghc-6.4.2: file `HUnit-1.0/Hat/HUnitLang.hs' does not exist
If I switch into the HUnit-1.0 directory and run "hmake -hat HUnitLang.lhs":
hmake -hat HUnitLang.lhs
hat-trans HUnitLang.lhs
Wrote Hat/HUnitLang.hs
/usr/bin/ghc -c -package hat -o Hat/HUnitLang.o Hat/HUnitLang.hs
Hat/HUnitLang.hs:52:38:
Could not find module `Hat.PreludeBuiltin':
use -v to see a list of the files searched for
In the fourth argument of `Hat.Hat.uapp1', namely `aioError'
In the definition of `hassertFailure':
hassertFailure fmsg p
= Hat.Hat.uapp1 p59v23v59v60
p59v23v59v29
p
aioError
hioError
(Hat.Hat.uapp1 p59v32v59v60
p59v32v59v40
p
auserError
huserError
(Hat.Hat.uapp2
p59v43v59v60
p59v55v59v56
p
(+++)
(*++)
(ghunitPrefix p59v43v59v53 p)
fmsg))
I'd like to be able to trace my code; I'm indifferent to whether or
not I trace the code within HUnit. Any suggestions on how I can do
this?
Katerina Barone-Adesi
More information about the Hat
mailing list