<div dir="ltr">Yes, that is my point. Existentials cannot be unwrapped.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 20, 2016 at 4:18 AM, Kosyrev Serge <span dir="ltr"><<a href="mailto:_deepfire@feelingofgreen.ru" target="_blank">_deepfire@feelingofgreen.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Jeffrey Brown <<a href="mailto:jeffbrown.the@gmail.com">jeffbrown.the@gmail.com</a>> writes:<br>
> After further study I believe existentials are not (at least alone)<br>
> enough to solve the problem.<br>
</span>..<br>
<span class="">> getInt :: ShowBox -> Int<br>
> getInt (SB i) = i<br>
><br>
> will not compile, because it cannot infer that i is an Int:<br>
<br>
</span>You take a value of an existentially quantified type (which means it<br>
can be anything at all, absent some extra context) and *proclaim* it<br>
is an integer.<br>
<br>
On what grounds should the compiler accept your optimistic restriction?<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
с уважениeм / respectfully,<br>
Косырев Сергей<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Jeffrey Benjamin Brown</div></div>
</div>