[Haskell-cafe] Re: Semantics of uniqueness types for IO (Was:
Why can't Haskell be faster?)
Jonathan Cast
jonathanccast at fastmail.fm
Fri Nov 2 13:37:06 EDT 2007
On Fri, 2007-11-02 at 11:56 -0400, Brandon S. Allbery KF8NH wrote:
> On Nov 2, 2007, at 11:51 , Jonathan Cast wrote:
>
> >> I will grant that hiding *World / RealWorld# inside IO is cleaner
> >> from a practical standpoint, though. Just not from a semantic one.
> >
> > On the contrary. GHC's IO newtype isn't an implementation of IO in
> > Haskell at all. It's an implementation in a language that has a
> > Haskell-compatible subset, but that also has semantically bad
> > constructs
>
> Differing viewpoints, I guess; from my angle, Clean's "uniqueness
> constraint" looks like a hack hidden in the compiler.
Yeah. After all, the "uniqueness constraint" has a theory with an
excellent pedigree (IIUC linear logic, whose proof theory Clean uses
here, goes back at least to the 60s, and Wadler proposed linear types
for IO before anybody had heard of monads). It's not some random hack
somebody happened to notice would work, any more than existential types
are.
jcc
More information about the Haskell-Cafe
mailing list