Calling an external command from a Haskell program
Salvador Lucas
slucas at dsic.upv.es
Tue Oct 21 10:36:05 EDT 2003
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 reason to send my
first message. 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 like Hugs.
Thus, since I normally use Hugs rather than GHC
I was afraid to have some problem (which one?) with
it.
>From Haskell's WiKi pages I learnt that something else was
available for POSIX (which I do not use :-( ).
Anyway, I have implemented my utility by using system
and it seems to run quite ok... Unfortunately I still
do not know which is the weak point of these functions
in Hugs...
Best regards,
Salvador.
More information about the Haskell
mailing list