Thanks for your explanations. At 12:10 22/05/03 +0100, Alastair Reid wrote:
If you're writing a non-trivial program, you might be best importing things directly from the standard libraries even if it is exported by the Prelude.
Yes, I do that. My problem was that I was looking at the IO library documentation [1] and overlooked the prelude functions. I think it's just a learning-curve problem. [1] http://www.haskell.org/onlinereport/io.html
Alternatively, you might consider importing things from the hierarchical libraries. The advantage of the hierarchical libraries is that their interfaces are not frozen by the Haskell-98 definition but that is, of course, also their chief disadvantage.
I've come to see the Haskell 98 definition as a useful baseline rather than an endpoint. Since I started using the state transformer monad I've migrated my code to use the hierarchical libraries (under Hugs, so far), which was a mostly painless process. By way of feedback, a couple of oddities I noticed were: (a) I couldn't pick up other libraries from the hierarchical tree (Parsec, HUnit), and still have to name their directories explicitly in the Hugs registry entry. (b) I had to explicitly import a couple of Data.Char values that were previously picked up automatically (isSpace somes to mind). #g ------------------- Graham Klyne <GK@NineByNine.org> PGP: 0FAA 69FF C083 000B A2E9 A131 01B9 1C7A DBCA CB5E