filepath mangling under Windows?

Sigbjorn Finne
Tue, 5 Mar 2002 07:34:07 -0800

ghc-5.02.2 is not a cygwin application, so it won't
understand paths like /d/foo -- it will understand
d:/foo and d:\foo though.

Internally, the compiler will canonicalise paths to
'platform-native' formats before passing them to
external tools, which is why you see the slashes
reversed. GHC could with benefit do some
verification of -o paths, to avoid the cryptic msg
you're seeing -- I'll add it to my ToDo list.


----- Original Message -----
From: "Malcolm Wallace" <>
To: <>
Sent: Tuesday, March 05, 2002 02:54
Subject: filepath mangling under Windows?

> With ghc-5.02.2 running from a Makefile in a cygwin shell under
> Windows XP, the following behaviour occurs:
>     ghc -package lang -package posix -c
>         -o
>         QSort.hs
>     Assembler messages: FATAL: Can't create
>         No such file or directory
> It looks like ghc has reversed the slashes in the filepath given
> to the -o option, and this is the reason the assembler fails.
> The directory certainly exists, but we suspect cygwin only understands
> the forward-slash form not the backward-slash form.
> Is this a bug in ghc?  Or is there some option we can give to persuade
> ghc not to reverse the slashes?
> Regards,
>     Malcolm