Re: Problem with ghc on Windows ME

2004-01-30 Thread Gour
Simon Peyton-Jones ([EMAIL PROTECTED]) wrote: > Simon and I spent an hour getting to the bottom of Gour's problem. Thank you very much for taking the issue. It's very much appreciated. > Simon M sent round a source patch yesterday. It'd be great if someone > could confirm that it really works.

RE: Problem with ghc on Windows ME

2004-01-30 Thread Simon Marlow
[ file actually attached this time... ] > > In released software, I'm using only system so far, so won't be > > affected negatively. But I still haven't managed to work around the > > "works in win98"/"fails in winXP" problem I mentioned, and have so > > far avoided trying rawSystem because of th

RE: Problem with ghc on Windows ME

2004-01-30 Thread Simon Marlow
> In released software, I'm using only system so far, so won't be > affected negatively. But I still haven't managed to work around the > "works in win98"/"fails in winXP" problem I mentioned, and have so > far avoided trying rawSystem because of the version problem. If you > can offer a workaroun

RE: Problem with ghc on Windows ME

2004-01-30 Thread Richard Black
; 'Claus Reinke'; '[EMAIL PROTECTED]' Cc: Richard Black; Simon Peyton-Jones Subject: RE: Problem with ghc on Windows ME Well found! Still, I found I could not understand the rules. But I think the story this Convert \" to \\\" otherwise convert

Re: Problem with ghc on Windows ME

2004-01-29 Thread C.Reinke
> No, the effect is that the arguments are passed unmodified to the > program. The implementation of rawSystem might have to do some > compensation under the hood (eg. on Windows), but that's not visible to > the client. As I've learned to interpret the uncompensated arguments, I'd prefer a rawS

Re: Problem with ghc on Windows ME

2004-01-29 Thread Glynn Clements
C.Reinke wrote: > Therefore, my suggestion would be to keep the rawSystem from > ghc-6.0.1 (which doesn't seem to do any interpretation?), and > to provide a system-specific escape function > > System.Cmd.escape :: String -> String -> String > -- (System.Cmd.escape chars string) escapes occu

RE: Problem with ghc on Windows ME

2004-01-29 Thread Simon Marlow
> > It's called 'raw' because it is supposed to get the > arguments through > > *unmodified* to the called program. No file globbing, no > escape stuff, nothing. > > That's exactly what I'm worried about: it seems that rawSystem is > *not* passing the arguments unmodified, but tries to compen

RE: Problem with ghc on Windows ME

2004-01-29 Thread Carl Witty
On Thu, 2004-01-29 at 03:31, Simon Marlow wrote: > > So does that mean functionality has been lost in the move from > > ghc-6.0.1? > > No, the behaviour is improved in 6.2 because we're now careful to escape > quotes before passing the command-line to the operating system. > > I think confusion

Re: Problem with ghc on Windows ME

2004-01-29 Thread Joachim Durchholz
Simon Marlow wrote: After Googling around a bit, I found this description of exactly how Windows interprets command lines in the C runtime: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccelng/htm/progs_12.asp Note that this is how the startup code of programs compiled with a

Re: Problem with ghc on Windows ME

2004-01-29 Thread C.Reinke
> It's called 'raw' because it is supposed to get the arguments through > *unmodified* to the called program. No file globbing, no escape stuff, > nothing. That's exactly what I'm worried about: it seems that rawSystem is *not* passing the arguments unmodified, but tries to compensate for windows

Re: Problem with ghc on Windows ME

2004-01-29 Thread Carsten Schultz
On Thu, Jan 29, 2004 at 02:53:21PM -, Simon Marlow wrote: > After Googling around a bit, I found this description of exactly how > Windows interprets command lines in the C runtime: > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccelng > /htm/progs_12.asp > > As you can

RE: Problem with ghc on Windows ME

2004-01-29 Thread Simon Peyton-Jones
o s go [] = ['"'] Simon | -----Original Message- | From: Simon Marlow | Sent: 29 January 2004 14:53 | To: Claus Reinke; Simon Peyton-Jones; [EMAIL PROTECTED] | Subject: RE: Problem with ghc on Windows ME | | After Googling around a bit, I found this description of exac

RE: Problem with ghc on Windows ME

2004-01-29 Thread Simon Peyton-Jones
implementation matter S | -Original Message- | From: [EMAIL PROTECTED] [mailto:glasgow-haskell-users- | [EMAIL PROTECTED] On Behalf Of Malcolm Wallace | Sent: 29 January 2004 13:48 | To: [EMAIL PROTECTED] | Subject: Re: Problem with ghc on Windows ME | | "Simon Marl

RE: Problem with ghc on Windows ME

2004-01-29 Thread Simon Marlow
> Of Simon Marlow > Sent: 29 January 2004 11:31 > To: Claus Reinke; Simon Peyton-Jones; > [EMAIL PROTECTED] > Subject: RE: Problem with ghc on Windows ME > > > > So does that mean functionality has been lost in the move from > > ghc-6.0.1? > > No,

RE: Problem with ghc on Windows ME

2004-01-29 Thread Simon Marlow
> > The > implementation of > > rawSystem will attempt to compensate for the internal > translation that > > Windows does on the command-line; on Unix no translation is > necessary. > > So clients of rawSystem should be more portable, because

Re: Problem with ghc on Windows ME

2004-01-29 Thread Malcolm Wallace
"Simon Marlow" <[EMAIL PROTECTED]> writes: > The implementation of > rawSystem will attempt to compensate for the internal translation that > Windows does on the command-line; on Unix no translation is necessary. > So clients of rawSystem should be

RE: Problem with ghc on Windows ME

2004-01-29 Thread Simon Marlow
> So does that mean functionality has been lost in the move from > ghc-6.0.1? No, the behaviour is improved in 6.2 because we're now careful to escape quotes before passing the command-line to the operating system. I think confusion has arisen because Simon pointed out that there's no way, on W

Re: Problem with ghc on Windows ME

2004-01-28 Thread Claus Reinke
>| For system, I do need doublequotes in arguments (e.g., when passing >| complex option flags to the programs invoked, or when the arguments >| contain strings). Can that really always be avoided for rawSystem? >Perhaps the comment is misleading. You can indeed put quotes in >arguments (they get

RE: Problem with ghc on Windows ME

2004-01-28 Thread Simon Peyton-Jones
| For system, I do need doublequotes in arguments (e.g., when passing | complex option flags to the programs invoked, or when the arguments | contain strings). Can that really always be avoided for rawSystem? Perhaps the comment is misleading. You can indeed put quotes in arguments (they get esc

Re: Problem with ghc on Windows ME

2004-01-28 Thread Claus Reinke
>rawSystem :: FilePath -> [String] -> IO ExitCode > >Question: how do you get the string \" into an argument? Turns out that >the argument "\\"" does not do the job. (This turns into a single \.) >Puzzling but probably not important in practice. This comment is puzzling me: I tend to use System.

RE: Problem with ghc on Windows ME

2004-01-28 Thread Simon Peyton-Jones
> *** Literate pre-processor C:\GHC\GHC-6.2\unlit.exe -h Demo.lhs Demo.lhs > C:\WINDOWS\TEMP\ghc-1160737.lpp > > Failed: C:\GHC\GHC-6.2\unlit.exe -h Demo.lhs Demo.lhs > C:\WINDOWS\TEMP\ghc-1160737.lpprawSystem: does not exist (No such file or > directory) *** Deleting temp files Deleting: C:/WINDO

RE: Problem with ghc on Windows ME

2004-01-27 Thread Simon Marlow
We looked into this issue today (without access to a Win98/ME box though). The conclusion, I think, is that: - rawSystem is wrongly escaping backslashes before executing the command. - NT-derived flavours of Windows are more forgiving than Win95-derived Windows when it comes to multi

Re: Problem with ghc on Windows ME

2004-01-27 Thread Derek Elkins
On Tue, 27 Jan 2004 09:24:43 +0100 Gour <[EMAIL PROTECTED]> wrote: > Derek Elkins ([EMAIL PROTECTED]) wrote: > > > Well, what's the -v output for the "hello world" file? In a > > nutshell, what's all the information that could be provided that > > might possibly be useful and does anything go wr

Re: Problem with ghc on Windows ME

2004-01-27 Thread Gour
Derek Elkins ([EMAIL PROTECTED]) wrote: > Well, what's the -v output for the "hello world" file? In a nutshell, > what's all the information that could be provided that might possibly be > useful and does anything go wrong doing the things GHC is attempting to > do directly. I've already provi

Re: Problem with ghc on Windows ME

2004-01-27 Thread Gour
andrew cooke ([EMAIL PROTECTED]) wrote: > is there any way to raise this as a bug so that someone involved with ghc > finds a suitable machine and solves the problem? it's not just my client > that's having problems - someone else here has reported something similar. I'd also like to see this ma

Re: Problem with ghc on Windows ME

2004-01-27 Thread Derek Elkins
On Mon, 26 Jan 2004 13:16:21 -0300 (CLST) "andrew cooke" <[EMAIL PROTECTED]> wrote: > > i am using win2k too. i've forwarded your message to the person with > the problem. > > but we already know that the problem is not restricted to unlit. he > cannot compile a simple "hello world" in a plain

Re: Problem with ghc on Windows ME

2004-01-26 Thread andrew cooke
i am using win2k too. i've forwarded your message to the person with the problem. but we already know that the problem is not restricted to unlit. he cannot compile a simple "hello world" in a plain .hs file (see my first email). is there any way to raise this as a bug so that someone involved

Re: Problem with ghc on Windows ME

2004-01-26 Thread Derek Elkins
On Mon, 26 Jan 2004 00:12:56 -0300 (CLST) "andrew cooke" <[EMAIL PROTECTED]> wrote: > the output is enclosed. the problem seems to be temporary files. > what would cause that (i've just emailed him to check that the TEMP > directory exists)? > *** Literate pre-processor > C:\GHC\GHC-6.2\unlit.e

Re: Problem with ghc on Windows ME

2004-01-26 Thread andrew cooke
the directory exists. andrew andrew cooke said: > the output is enclosed. the problem seems to be temporary files. what > would cause that (i've just emailed him to check that the TEMP directory > exists)? > > thanks for the quick response, > andrew > > ps unlikely to reply again today (bed!)

Re: Problem with ghc on Windows ME

2004-01-26 Thread Gour
Derek Elkins ([EMAIL PROTECTED]) wrote: > Use the -v (or -vN for some digit N) to get verbose output, it should > point out exactly where the problem is happening. I'm betting it's some > problem finding/using gcc or ld, or potentially an issue with temporary > files. Didn't know about -vN switc

Re: Problem with ghc on Windows ME

2004-01-26 Thread Gour
andrew cooke ([EMAIL PROTECTED]) wrote: > the output is enclosed. the problem seems to be temporary files. what > would cause that (i've just emailed him to check that the TEMP directory > exists)? [...] > *** Literate pre-processor C:\GHC\GHC-6.2\unlit.exe -h Demo.lhs Demo.lhs > C:\WINDOWS\TE

Re: Problem with ghc on Windows ME

2004-01-26 Thread Gour
andrew cooke ([EMAIL PROTECTED]) wrote: Hi Andrew! > I'm trying to help someone compile some code of mine and unfortunately > they seem to have hit a problem with ghc. Since this is all second hand > info I suspect it contains errors and/or isn't useful, but I'm hoping > someone recognises the p

Re: Problem with ghc on Windows ME

2004-01-25 Thread andrew cooke
the output is enclosed. the problem seems to be temporary files. what would cause that (i've just emailed him to check that the TEMP directory exists)? thanks for the quick response, andrew ps unlikely to reply again today (bed!) Derek Elkins said: > On Sun, 25 Jan 2004 22:51:47 -0300 (CLST) >

Re: Problem with ghc on Windows ME

2004-01-25 Thread Derek Elkins
On Sun, 25 Jan 2004 22:51:47 -0300 (CLST) "andrew cooke" <[EMAIL PROTECTED]> wrote: > Any suggestions? Use the -v (or -vN for some digit N) to get verbose output, it should point out exactly where the problem is happening. I'm betting it's some problem finding/using gcc or ld, or potentially an

Problem with ghc on Windows ME

2004-01-25 Thread andrew cooke
Hi, I'm trying to help someone compile some code of mine and unfortunately they seem to have hit a problem with ghc. Since this is all second hand info I suspect it contains errors and/or isn't useful, but I'm hoping someone recognises the problem as already known and can help out. ghc runs, a