RE: Calling an external command from a Haskell program

2003-10-21 Thread Simon Marlow
> PS. why the differences in default access to standard modules? > should GHC be more restrictive there? No, this is a feature. See http://www.haskell.org/ghc/docs/latest/html/users_guide/x1097.html#GHCI-SCOPE in particular section 3.4.1.1. Cheers, Simon __

Re: Calling an external command from a Haskell program

2003-10-21 Thread C.Reinke
> If you want access to its I/O streams as well, you can use > Posix.popen, which is not standard Haskell 98, I think, but it's > in GHC. Even worse, it is not portable (AFAICT)! I'm worried by the tendency towards Posix, at a time when, e.g., GHC by default no longer supports this on Windows (we

Re: Calling an external command from a Haskell program

2003-10-21 Thread C.Reinke
> 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

Re: Calling an external command from a Haskell program

2003-10-21 Thread Alastair Reid
> I already knew about 'system' in > library System, but the Hugs installation says: > > -- Warning: the implementation of these functions in Hugs 98 is very weak. > -- The functions themselves are best suited to uses in compiled programs, > -- and not to use in an interpreter-based environment lik

Re: Calling an external command from a Haskell program

2003-10-21 Thread Salvador Lucas
Hi, Mikael Brockman wrote: > > > You can use.. > > system :: String -> IO ExitCode > > in library module System.Cmd > > > > If you want access to its I/O streams as well, you can use > Posix.popen, which is not standard Haskell 98, I think, but it's in > GHC. Yes, in fact, this was the re

Re: Calling an external command from a Haskell program

2003-10-20 Thread Mikael Brockman
Adrian Hey <[EMAIL PROTECTED]> writes: > On Wednesday 15 Oct 2003 8:44 am, Salvador Lucas wrote: > > Dear all, > > > > I think this question is not new, but I am not able to > > find the answer. How to proceed to execute an external > > Linux command (e.g., 'ls') from a Haskell program? > > > > Th

Re: Calling an external command from a Haskell program

2003-10-20 Thread Adrian Hey
On Wednesday 15 Oct 2003 8:44 am, Salvador Lucas wrote: > Dear all, > > I think this question is not new, but I am not able to > find the answer. How to proceed to execute an external > Linux command (e.g., 'ls') from a Haskell program? > > Thanks in advance, You can use.. system :: String

Re: Calling an external command from a Haskell program

2003-10-15 Thread Graham Klyne
I think library module System, function system, may be what you want. (I've never used it myself.) There's a bit of discussion here: http://www.dcs.gla.ac.uk/mail-www/haskell/msg02441.html #g -- At 09:44 15/10/03 +0200, Salvador Lucas wrote: Dear all, I think this question is not new, but I am

Re: Calling an external command from a Haskell program

2003-10-15 Thread Alastair Reid
> I think this question is not new, but I am not able to > find the answer. How to proceed to execute an external > Linux command (e.g., 'ls') from a Haskell program? system("ls") system :: String -> IO ExitCode -- Alastair Reid www.haskell-consulting.com _

Calling an external command from a Haskell program

2003-10-15 Thread Salvador Lucas
Dear all, I think this question is not new, but I am not able to find the answer. How to proceed to execute an external Linux command (e.g., 'ls') from a Haskell program? Thanks in advance, Salvador. ___ Haskell mailing list [EMAIL PROTECTED] http://ww