filepath mangling under Windows?

Sigbjorn Finne sof@galois.com
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.

hth
--sigbjorn

----- Original Message -----
From: "Malcolm Wallace" <Malcolm.Wallace@cs.york.ac.uk>
To: <glasgow-haskell-users@haskell.org>
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
/d/haskell/hmake-3.00/targets/ix86-CYGWIN_NT-5.1/obj/hmake/QSort.o
>         QSort.hs
>     Assembler messages: FATAL: Can't create
>
\d\haskell\hmake-3.00\targets\ix86-CYGWIN_NT-5.1\obj\hmake\QSort.o:
>         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