using hmake with hat

Hal Daume III hdaume@ISI.EDU
Thu, 27 Jun 2002 09:22:17 -0700 (PDT)


Hi,

I'm just getting in to this hat thing and am experiencing a slight 
difficulty.  My directory structure looks like

   .../projects
   .../projects/SemGraph
   .../projects/Util
   .../projects/NLP
   .../projects/FGL
   ...

I'm in the SemGraph directory and am hmaking a program named
AlignGraph.  Inside Util there is a modeule Util.STM which is used in
AlignGraph.  I have ".." in my path when I hmake, and when I don't do hat,
everything works fine.  However, when I do use hat, hmake seems to look
int the wrong place for the generated files:

  9:16am moussor:SemGraph/ hmake -ghc AlignGraph.hs -I../FGL -I.. -package
                           data -cpp -fvia-c -fglasgow-exts -hat
  hat-trans  ../Util/STM.hs
  Wrote ../Util/TSTM.hs
  ghc  -package data -cpp -fvia-c -fglasgow-exts  -I../FGL -I..  -i../FGL
       -i..  -c -package hat -o ../TUtil/STM.o ../TUtil/STM.hs
  ghc-5.02.3: file `../TUtil/STM.hs' does not exist

so it seems hat is creating ../Util/TSTM.hs, but hmake prepends the "T" to
"Util" instead of "STM".

This seems to be a hat problem; even though it creates Util/TSTM.hs, the
name of the generated module is "TUtil.STM".

Any suggestions on what to do about this?  I can't imagine people haven't
hit this wall before...

 - Hal

--
Hal Daume III

 "Computer science is no more about computers    | hdaume@isi.edu
  than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume