On Thursday, 2003-08-14, 13:37, CEST, blaat blaat wrote:
[...]
Hello,
I don't know exactly which of the following questions have already been
answered but I decided to answer them all anyway.
What is the difference between putStr a, (putStr a, putStr a), putStr
(putStr a), putStr (show
Hi all,
I've been following this discussion with some interest.
Last time I looked, hugs, ghc and nhc98 all implemented
I/O differently. No doubt there are even more
alternatives in other Haskell implementations (real or imaginary).
In itself this is probably not too surprising. They are,
On Thu, 14 Aug 2003, blaat blaat wrote:
To many questions, not enough mail. First, thanks for all your replies.
Second, I stand totally corrected on the fact that we cannot break down
monads. Functions of type m a-b are called impure,
Haskell is a pure language, so there are *no* impure
On Wed, 13 Aug 2003 13:26:34 +0200
blaat blaat [EMAIL PROTECTED] wrote:
I have a long reply, perhaps I'll post it later. Here's a more
pragmatic short one.
What did we lose? Well, introspection comes to mind. A monad is
strange in the sense that, actually, there does not seem to be any
Alistair,
Hhhmmm. That is an interesting issue, and I am unsure how to treat it
in the tutorial. I did attempt to explain the ability of the monad to
isolate impure computations, but I think I need to make a better
explanation of what an action is and how it is used.
As for the question of
To many questions, not enough mail. First, thanks for all your replies.
Second, I stand totally corrected on the fact that we cannot break down
monads. Functions of type m a-b are called impure, see also
unsafePerformIO. I am questioning (a) the exact relation between monads,
monadic IO, IO in
Peter G. Hancock wrote:
Jeff Newbern wrote (on Tue, 12 Aug 2003 at 17:20):
?
The functions exported from the IO module do not
perform I/O themselves. They return I/O actions, which describe an I/O
operation to be performed. The I/O actions are combined within the IO
monad (in a
The overall message I have taken from your post is that I need to
be more precise to convey the correct information and avoid confusion
(or worse, misinformation).
As I understood it, the tutorial should be instructive. So I would not
try to be more precise at the beginning, because too much
I suspect that tutorials should at some point mention some
definitions of monads, monoids et al --- since this is where the power
(sorry, QA) comes from.
I was reading an overview-for-non-specialists of category theory earlier
today, and was surprised by the familiarity of much of it - based
Peter,
Thank you for criticism. This is exactly the kind of feedback I need.
The overall message I have taken from your post is that I need to
be more precise to convey the correct information and avoid confusion
(or worse, misinformation).
I should have said that a function which performs a
From: Derek Elkins [EMAIL PROTECTED]
blaat blaat [EMAIL PROTECTED] wrote:
[...]
However, given that observation, the fact that IO is a monad I find to
be a _rather arbitrary design decision_; why not define a small term
language which may be passed to the OS?
That would be confusing to use or
Hello,
I have put up all-in-one archives of the tutorial for people who
prefer to read it offline.
http://www.nomaware.com/monads/monad_tutorial.tgz
and
http://www.nomaware.com/monads/monad_tutorial.zip
Thanks,
Jeff Newbern
[EMAIL PROTECTED]
__
Do you Yahoo!?
On Tue, Aug 12, 2003 at 03:04:39PM -0400, Antony Courtney wrote:
So then, in your view, what *is* an IO action?
One conceptual model is that an IO action with type (IO a) denotes a
function of type World - (World,a).
But the IO monad is not a state monad, because other agents may change
the
From: Wolfgang Jeltsch [mailto:[EMAIL PROTECTED]
For example, the function readFile is pure. For a specific
string s the
expression readFile s always yields the same result: an I/O
action which
searches for a file named s, reads its content and takes this
content as the
result of
On Wed, 13 Aug 2003 09:44:36 +0200
blaat blaat [EMAIL PROTECTED] wrote:
Hmmm, I personally always thought of the IO monad as being a synonym
for Program
So. What is a Program?
[...]
For what is the interpretation of an object of type IO a? Well, it is
a bit of a hack atop of Haskell,
Hmmm, I personally always thought of the IO monad as being a synonym for
Program (or, for functions wich return an IO a, a subroutine with
side-effects which returns a value of type a).
We can build mini programs (like putStr), and compose them in a sequential
manner (including something alike
-Original Message-
From: Jeff Newbern [mailto:[EMAIL PROTECTED]
Alistair,
Hhhmmm. That is an interesting issue, and I am unsure how to treat it
in the tutorial. I did attempt to explain the ability of the monad to
isolate impure computations, but I think I need to make a better
Alistair,
Thanks for your message regarding the debate about monads and purity.
What do you think about these additions as a discussion of the issue?
Does this address everything you think is needed? Is there a clearer
way to explain it?
Thanks,
Jeff
In the section No Way Out:
--
The
point mention some
definitions of monads, monoids et al --- since this is where the power
(sorry, QA) comes from.
Phil
On Tue, 12 Aug 2003, Bayley, Alistair wrote:
Date: Tue, 12 Aug 2003 12:10:24 +0100
From: Bayley, Alistair [EMAIL PROTECTED]
Subject: RE: Yet Another Monad Tutorial
From
Definitely the most comprehensive monads tutorial on the net.
Great stuff!
Thanks,
Peter
On Tuesday 12 August 2003 11:40, Jeff Newbern wrote:
Hello everyone,
Due to the scarcity of monad tutorials available (:^), I have
written one of my own. I hope that this one is both more gentle
and
20 matches
Mail list logo