[Haskell-cafe] do

Peter Verswyvelen bf3 at telenet.be
Mon Oct 15 12:10:03 EDT 2007

Yes indeed, Concurrent Clean actually just passes around the "world" object
in "direct/explicit style" but uses uniquness typing to make sure nothing
happens that would violate the nice FP paradigm (mainly referential
transparency?). That is, I think it's like that :)

-----Original Message-----
From: haskell-cafe-bounces at haskell.org
[mailto:haskell-cafe-bounces at haskell.org] On Behalf Of Brandon S. Allbery
Sent: Monday, October 15, 2007 3:49 PM
To: jerzy.karczmarczuk at info.unicaen.fr
Cc: haskell-cafe Cafe
Subject: Re: [Haskell-cafe] do

On Oct 15, 2007, at 7:02 , jerzy.karczmarczuk at info.unicaen.fr wrote:

> IO is different, you *cannot* make it non-monadic.

Not really true; it's just much more painful.  You just e.g.  
explicitly do what the ghc library's implementation of IO does:   
construct a chain of functions with an opaque (and optionally(?)  
existential to enforce the opacity) "RealWorld" type which is passed  
as state from one invocation to the next, with the "top level"  
application partially applied.  Or one of the operationally  
equivalent tricks used by other Haskell runtime implementations, cf.  
"IO Inside".

It's not so much hard as it is far too much "busywork" for a  
programmer to want to deal with when programming... hence hiding the  
scaffolding in the type, which is perhaps the most general  
description of what a Haskell monad actually is.

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

Haskell-Cafe mailing list
Haskell-Cafe at haskell.org

More information about the Haskell-Cafe mailing list