[Hat] Using Hat with HUnit
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Wed Oct 11 11:00:34 EDT 2006
"Katerina Barone-Adesi" <katerinab at gmail.com> wrote:
> hat-trans -i.. -iHUnit-1.0 HUnit-1.0/HUnitLang.lhs
> Wrote Hat/HUnit-1.0/HUnitLang.hs
> /usr/bin/ghc ... > HUnit-1.0/Hat/HUnitLang.hs
As I think you can see, hat-trans and hmake are disagreeing about where
the Hat-translated versions of the source-code should live. hat-trans
thinks
Hat/HUnit-1.0/HUnitLang.hs
whilst hmake thinks
HUnit-1.0/Hat/HUnitLang.hs
(the inital portion is swapped around).
The main reason for this is a differing interpretation of the -i flag
(giving a directory where extra source files live).
One workaround is to move all the HUnit code to the current directory,
rather than a separate directory.
Another workaround is to change the name of the HUnit directory, so it
no longer begins with upper-case, e.g. hunit-1.0. I know this is
somewhat fragile, but the only way some tools know how to distinguish
between the filename of a simple module, and the pathname of a
hierarchical module, is on the case of the first letter of the directory
part.
> 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?
I hope one of these suggestions is useful. If not, please post again!
Regards,
Malcolm
More information about the Hat
mailing list