[Haskell-cafe] Re: Semantics of uniqueness types for IO (Was: Why
can't Haskell be faster?)
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Fri Nov 2 08:35:03 EDT 2007
On Nov 2, 2007, at 6:35 , apfelmus wrote:
> during function evaluation. Then, we'd need a "purity lemma" that
> states that any function not involving the type *World as in- and
> output is indeed pure, which may be a bit tricky to prove in the
> presence of higher-order functions and polymorphism. I mean, the
> function arrows are "tagged" for side effects in a strange way,
> namely by looking like *World -> ... -> (*World, ...).
I don't quite see that; the Clean way looks rather suspiciously like
my "unwrapped I/O in GHC" example from a couple weeks ago, so I have
trouble seeing where any difficulty involving functions not using
*World / RealWorld# creeps in.
I will grant that hiding *World / RealWorld# inside IO is cleaner
from a practical standpoint, though. Just not from a semantic one.
--
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
More information about the Haskell-Cafe
mailing list