ghc-cvs-snapshot with wxHaskell

Georg Martius mai99dgf at
Thu Feb 17 11:24:52 EST 2005

Hi again,

Fuck! The problem is different indeed!
As Patrick pointed out earlier, the problem with the import-paths is the -M run, not the normal compilation run.
> /usr/bin/ghc -M wxcore/src/Graphics/UI/WXCore/WxcClassTypes.hs  \
>   -iout/wxcore/imports -Iwxc/include
works fine with ghc-6.2, but ghc-6.4:
> Could not find module `Graphics.UI.WXCore.WxcObject'
Therefore Patrick suggested to include -iwxcore/src/
However it should not be necessary for ghc, but I see why it needs it to produce the spurious line :-)

Another bug in ghc!
> /usr/bin/ghc -M wxcore/src/Graphics/UI/WXCore/WxcClassTypes.hs  \
>   -iout/wxcore/imports -Iwxc/include -iwxcore/src \
>   -odir out/wxcore/imports/Graphics/UI/WXCore/
produces (among others):
> out/wxcore/imports/Graphics/UI/WXCore//Graphics/UI/WXCore/WxcClassTypes.o : \	wxcore/src/Graphics/UI/WXCore/WxcClassTypes.hs
where you see that the -odir is not handled correctly.

Now I see the reason why I added the source directories to the import search-path in general. The current appoach for the depfiles (until the -odir thing is fixed):
  - include -isourcepath and NO -odir
  - use grep to get rid of the spurious dependency lines
  - use the old approach for renaming
(patch attached)


On Thu, 17 Feb 2005 15:54:00 +0100, Daan Leijen <daan at> wrote:

>> The original code in the makefile.lib replaced
>>     (basename input.hs) with (basename output.o)
>> and
>>     *.hi with *.o
>> which is a quite weird approach to the problem. I'am not sure but I
>> think the new approach is better:
>>      let the .o files be correct through the -odir flag
>>     replace (dir input)/FILE.hi with (dir output)/$FILE.o
> This seems indeed much more sensible. I'll try this out with ghc 6.2.2.
>> A more general question: We doesn't -ohi dir/filename.hi is not
>> reflected in the dependencies.
>> I tried:
>>> ghc -M -odir out -ohi out/A.hi A.hs
>> but nothing changed.
> Simon??
> Thanks again for your bug fixing,
> -- Daan.


---- Georg Martius,  Tel: (+49 34297) 89434 ----
------- ---------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makefile.lib.diff
Type: application/octet-stream
Size: 927 bytes
Desc: not available
Url :

More information about the Glasgow-haskell-users mailing list