And what&#39;s the denotational semantics of type classes?&nbsp; As far as I know it has never been done, because it&#39;s very complex.<br><br><div class="gmail_quote">On Tue, May 6, 2008 at 2:57 PM, Achim Schneider &lt;<a href="mailto:barsoap@web.de">barsoap@web.de</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Well, it&#39;s an unformalised and not much thought about out-of-the-tub<br>
idea, but here it goes:<br>
<br>
Let there be a monad/typeclass representing the denotional semantics of<br>
Haskell<br>
<br>
Do some instances of it, called e.g. GHC or Hugs.<br>
<br>
so, instead of<br>
<br>
main :: IO ()<br>
<br>
we have<br>
<br>
main :: (Haskell h) =&gt; h (IO ())<br>
<br>
or, if you need some feature of the Haskell runtime system XYZ<br>
<br>
main :: XYZ (IO ())<br>
<br>
or even<br>
<br>
main :: (FFI h) =&gt; h (IO ())<br>
<br>
and<br>
<br>
main :: (SomeLib h) =&gt; h (IO ())<br>
<br>
, and then go on and define every single language construct as part of<br>
this type hierarchy, and define some syntactic sugar to make stuff look<br>
exactly like haskell &#39;98 if you&#39;re just hacking away.<br>
<br>
I especially like the metacircularity of this approach, and the fact<br>
that every Model (read: implementation) of Haskell would have to admit<br>
that it is only a Model (read: instance) of Haskell.<br>
<br>
--<br>
(c) this sig last receiving data processing entity. Inspect headers for<br>
past copyright information. All rights reserved. Unauthorised copying,<br>
hiring, renting, public performance and/or broadcasting of this<br>
signature prohibited.<br>
<br>
_______________________________________________<br>
Haskell-prime mailing list<br>
<a href="mailto:Haskell-prime@haskell.org">Haskell-prime@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-prime" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-prime</a><br>
</blockquote></div><br>