Problem with ghc on Windows ME

Simon Marlow simonmar at microsoft.com
Thu Jan 29 13:58:56 EST 2004


 
> >                                                   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 
> they don't have
> > to know about quoting that happens under the hood.
> 
> This is probably a silly naming question, but aren't the names of
> 'System.system' and 'rawSystem' the wrong way round?  On the face
> of things, it would seem sensible for System.system to have the more
> portable behaviour, and rawSystem to be dependent on local 
> conventions.
> After all, System.system is defined in the official Libraries Report
> making no mention of any portability problems, whereas the name 'raw'
> suggests that no interpretation/quoting is going on, and hence it
> may be highly dependent on the underlying system.

Indeed.  The existing behaviour for System.system is (I assume) derived
from the POSIX sytem(), which also executes a command using the shell.
The naming is sensible in one respect: system goes via the shell,
whereas rawSystem bypasses the shell.

Unfortunately we can't easily change System.system to be the raw
version, because they have different types and to do so would break lots
of code.  System.Process will have a more reasonable interface, when I
get around to finishing it.

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list