Calling an external command from a Haskell program
C.Reinke
C.Reinke at kent.ac.uk
Tue Oct 21 14:32:58 EDT 2003
> The function system works fine in Hugs except on windows where DOS limitations
> cause the function to always return ExitSuccess. (ghc suffers from the same
> problem on Windows.)
Actually, that is not quite correct: ghc seems to suffer from this
problem only on older Windows versions (such as Windows 98), whereas
Hugs seems to have the bug also on newer Windows versions (such as
XP), at least in its current binary release.. I reported the
ghc/win98 problem earlier, below is what happens on Windows XP.
So the bug seems even worse in Hugs than in GHC?
Claus
PS. why the differences in default access to standard modules?
should GHC be more restrictive there?
---------------------------------------------------
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.0.1, for
Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package base ... linking ... done.
Prelude> System.system "fail" >>= print
'fail' is not recognized as an internal or external command,
operable program or batch file.
ExitFailure 1
Prelude>
---------------------------------------------------
|| || || || || || ||__ Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__|| __|| Copyright (c) 1994-2002
||---|| ___|| World Wide Web: http://haskell.org/hugs
|| || Report bugs to: hugs-bugs at haskell.org
|| || Version: Nov 2002
_________________________________________
Haskell 98 mode: Restart with command line option -98 to enable
extensions
Reading file "C:\Program Files\Hugs98\lib\Prelude.hs":
Hugs session for:
C:\Program Files\Hugs98\lib\Prelude.hs
Type :? for help
Prelude> :a System
Reading file "C:\Program Files\Hugs98\lib\System.hs":
Hugs session for:
C:\Program Files\Hugs98\lib\Prelude.hs
C:\Program Files\Hugs98\lib\System.hs
System> system "fail" >>= print
'fail' is not recognized as an internal or external command,
operable program or batch file.
ExitSuccess
More information about the Hugs-Bugs
mailing list