<br><br><div class="gmail_quote">2012/2/25 Andres Löh <span dir="ltr">&lt;<a href="mailto:andres.loeh@googlemail.com">andres.loeh@googlemail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">&gt; Would you have an example of a type for which it would be useful to have<br>
&gt; a DeepSeq instance, and that would require a V1 instance? I cannot think<br>
&gt; of one now; I originaly thought it would be necessary to permit deriving<br>
&gt; DeepSeq instances for types tagged with &quot;void&quot; types, but as José<br>
&gt; explained, in that case, the V1 instance isn&#39;t needed because those void<br>
&gt; types don&#39;t show up in the representation.<br>
<br>
</div>While void datatypes are rare, it just doesn&#39;t make sense to exclude<br>
them. It&#39;s an arbitrary restriction. Here&#39;s a constructed example:<br>
<br>
data X a = C1 Int | C2 a<br>
data Z -- empty<br>
<br>
type Example = X Z<br>
<br>
We&#39;re using Z as a parameter to X in order to exclude the use of the<br>
C2 case. Without a V1 case, you cannot use deepSeq on values of type<br>
Example.<br></blockquote><div><br>Yes, I agree. There should be a V1 instance, and it should return `undefined`. This gives the expected behavior of `seq` on an empty datatype, I think. If there is no V1 instance, you&#39;ll get a type-checking error (no instance for V1), preventing generic deepseq on any datatype that happens to use an empty datatype in its definition.<br>

<br><br>Cheers,<br>Pedro<br><br></div></div>