<p>That pattern looks so familiar. :) Existential types seem to fit in to the type system really well so I never got why it is not part of the standard.</p>
<div class="gmail_quote">On Aug 12, 2012 10:36 AM, &quot;Daniel Trstenjak&quot; &lt;<a href="mailto:daniel.trstenjak@gmail.com">daniel.trstenjak@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Hi Oleg,<br>
<br>
On Sat, Aug 11, 2012 at 08:14:47AM -0000, <a href="mailto:oleg@okmij.org">oleg@okmij.org</a> wrote:<br>
&gt; I&#39;d like to point out that the only operation we can do on the first<br>
&gt; argument of MkFoo is to show to it. This is all we can ever do:<br>
&gt; we have no idea of its type but we know we can show it and get a<br>
&gt; String. Why not to apply show to start with (it won&#39;t be evaluated<br>
&gt; until required anyway)?<br>
<br>
It&#39;s only a test case. The real thing is for a game and will be<br>
something like:<br>
<br>
class EntityT e where<br>
   update      :: e -&gt; e<br>
<br>
   render      :: e -&gt; IO ()<br>
<br>
   handleEvent :: e -&gt; Event -&gt; e<br>
<br>
   getBound    :: e -&gt; Maybe Bound<br>
<br>
<br>
data Entity = forall e. (EntityT e) =&gt; Entity e<br>
<br>
data Level = Level {<br>
   entities = [Entity],<br>
   ...<br>
   }<br>
<br>
<br>
Greetings,<br>
Daniel<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div>