Simon Marlow:
> Strictly speaking, you can't "evaluate" a value of type (IO a) and
> have it perform some I/O operations. In fact, there's no way to
> perform an IO computation in Haskell other than binding it to a
> value called 'Main.main',
> compiling and running it. (*)
Pablo E. Martinez Lopez:
> Recall: the type (IO a) is
> that of PROGRAMS performing I/O, but the EXECUTION of those programs is
> another matter. And as Simon Marlow pointed out, you have NO means to
> produce that execution other that binding your IO to Main.main.
Well, I see what you mean, no way, NO means, etc. So, the program below
in Hugs would not work as it should? Too bad...
-- ===========================
-- ioio.hs
dump f = readFile f >>= putStr
gimmeThat = dump "ioio.hs"
-- ===========================
Jerzy Karczmarczuk
Caen, France