Thanks - fixed in the next release. If you cannot wait,
change the "if ($Specific_hi_file eq '') { ... } " in
the constructNewHiFile sub in ghc-iface.prl (you'll
find that inside lib/ in a binary dist) to

 if ($Specific_hi_file eq '') {  # -ohi is used even if  module name != stem
of filename.
    ($hiname = $hifile_target) = $1 if  $hifile_target =~
/\/?([^\/\.]+)\.$HiSuffix/;
    if ($ModuleName{'new'} ne $hiname) {
       ($hidir  = $hifile_target) =~ s/(.*)$hiname\.$HiSuffix/$1/;
         $hifile_target = $hidir . $ModuleName{'new'} . ".$HiSuffix";
    }
 }

Outlook will probably do its outmost to mess up the above
paragraph, but hopefully it's clear what's changed.

--Sigbjorn

Mircea Draghicescu <[EMAIL PROTECTED]> writes: 
> 
> See below. Thanks.
> Mircea
> 
> ~/temp 87: ghc -o main main.hs
> ghc: module version changed to 1; reason: no old .hi file
> ~/temp 89: mkdir a
> ~/temp 90: mkdir a/b
> ~/temp 91: cp main.hs a/b
> ~/temp 92: ghc -o main a/b/main.hs
> ghc: module version changed to 1; reason: no old .hi file
> cp: cannot create regular file `b/Main.hi': No such file or directory
> ~/temp 93: mkdir b
> ~/temp 94: ghc -o main a/b/main.hs
> ghc: module version changed to 1; reason: no old .hi file
> ~/temp 95: ls b
> Main.hi
> ~/temp 96:
> 

Reply via email to