I am a long-time Hugs user, but am relatively new to ghc.
I've been trying to get a Makefile working, with little success.
After much investigation, the problem seems to be not with my Makefile, 
but that ghc does not like modules whose names start with 'Z'.  

Seems that a module called Zabc (in file Zabc.lhs) generates a 
Zabc.hi file whose first line is:

__interface ZZabc 1 402 where
            ^^ Note the repeated Z.
               This repetition does not seem to happen for other module names!

Is this a bug?  


Detailed Example:  Given the following two files
--------------- Zabc.lhs -------------------------
> module Zabc(a)
> where

> a :: Int
> a = 3
--------------------------------------------------


--------------- Main.hs --------------------------
module Main where

import qualified Zabc

main :: IO ()
main
  = do putStrLn ("set1: " ++ show Zabc.a)
       putStrLn "Done."
--------------------------------------------------

with no pre-existing *.hi *.o or *.hc files around,
the following command (using ghc version 4.02, patchlevel 0) gives
this output:

$  ghc -o test Zabc.lhs Main.hs
ghc: module version changed to 1; reason: no old .hi file

Main.hs:3: Could not find valid interface file `Zabc'

                       [But there is a file called Zabc.hi there]

Compilation had errors
$


Mark.

Dr Mark Utting, Senior Lecturer
Department of Computer Science
School of Computing and Mathematical Sciences
The University of Waikato       Tel:   +64 7 838 4791
Private Bag 3105                Fax:   +64 7 838 4155
Hamilton                        Email: [EMAIL PROTECTED]
New Zealand                     Web:   http://www.cs.waikato.ac.nz/~marku

The highest bandwidth output from a human is the notes pouring
from a concert pianist's fingers.

Reply via email to