| The first lines of CVSHigh.hs are:
| > {-# This module encapsulates the basic CVS functionality we need,
| >     calling CVSBasic to issue the commands, looking at the output,
| >     and returning what we need to know in a Haskell-friendly form.
| >     #-}
| > module CVSHigh(
| (The complete module is attached)
| The file compiles OK, but to my surprise, I cannot find CVSHigh.hi.
| Further investigation reveals that instead I have "encapsulates.hi"
| (also attached).  It looks as if GHC chooses the name "encapsulates"
| from the comment.  Indeed if I change "encapsulates" to "wraps" 
| I get wraps.hi.  However if I replace "This module e" by "E", sanity
| returns.
| 
| So er what exactly is going on please?  I thought that unless 
| a comment
| began with something like OPTIONS or INLINE it would be treated as 
| a "real" comment.

Ummm ... err ...

Ok.  Here's the Awful Truth.

ghc-5 does a quick pre-scan over source modules in order to establish
their name and what they import.  A bit like ghc -M.  This is to support
the automatic dependency analysis in the --make mode.  Because this
scan needs to be fast it is also pretty stupid, and when it sees
"module encapsulates", I guess it thinks it has found the module name.

I am a bit surprised because I thought I made the dependency chaser at
least ignore running comments.  I'll look into it.

J



_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to