<p dir="ltr">No time to go into details right now, unfortunately, but that is required for the extension mechanism of ext/ext1 to work properly.<br></p>
<p dir="ltr">Cheers, <br>
Pedro </p>
<div class="gmail_quote">On 18 Jul 2015 2:58 am, "Ryan Scott" <<a href="mailto:ryan.gl.scott@gmail.com">ryan.gl.scott@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It does seem unnecessary. The Data instance for Proxy is manually written in Data.Data:<br><br><pre><span>proxyConstr</span> <span>::</span> <span>Constr</span>
<a name="14e9eabba55f0f48_line-1335"></a><span>proxyConstr</span> <span>=</span> <span>mkConstr</span> <span>proxyDataType</span> <span>"Proxy"</span> <span>[]</span> <span>Prefix</span>
<a name="14e9eabba55f0f48_line-1336"></a>
<a name="14e9eabba55f0f48_line-1337"></a><a name="14e9eabba55f0f48_proxyDataType"></a><span>proxyDataType</span> <span>::</span> <span>DataType</span>
<a name="14e9eabba55f0f48_line-1338"></a><span>proxyDataType</span> <span>=</span> <span>mkDataType</span> <span>"Data.Proxy.Proxy"</span> <span>[</span><span>proxyConstr</span><span>]</span><a name="14e9eabba55f0f48_line-1339"></a></pre><br><pre><a name="14e9eabba55f0f48_line-1340"></a><a name="14e9eabba55f0f48_instance Data (Proxy t)"></a><span>instance</span> <span>(</span><span>Data</span> <span>t</span><span>)</span> <span>=></span> <span>Data</span> <span>(</span><span>Proxy</span> <span>t</span><span>)</span> <span>where</span>
<a name="14e9eabba55f0f48_line-1341"></a> <span>gfoldl</span> <span>_</span> <span>z</span> <span>Proxy</span> <span>=</span> <span>z</span> <span>Proxy</span>
<a name="14e9eabba55f0f48_line-1342"></a> <span>toConstr</span> <span>Proxy</span> <span>=</span> <span>proxyConstr</span>
<a name="14e9eabba55f0f48_line-1343"></a> <span>gunfold</span> <span>_</span> <span>z</span> <span>c</span> <span>=</span> <span>case</span> <span>constrIndex</span> <span>c</span> <span>of</span>
<a name="14e9eabba55f0f48_line-1344"></a> <span>1</span> <span>-></span> <span>z</span> <span>Proxy</span>
<a name="14e9eabba55f0f48_line-1345"></a> <span>_</span> <span>-></span> <span>error</span> <span>"Data.Data.gunfold(Proxy)"</span>
<a name="14e9eabba55f0f48_line-1346"></a> <span>dataTypeOf</span> <span>_</span> <span>=</span> <span>proxyDataType</span>
<a name="14e9eabba55f0f48_line-1347"></a> <span>dataCast1</span> <span>f</span> <span>=</span> <span>gcast1</span> <span>f</span>
<span style="font-family:arial,helvetica,sans-serif"><a name="14e9eabba55f0f48_line-1348"><br></a></span></pre><pre><span style="font-family:arial,helvetica,sans-serif">If dataCast1 weren't defined to be gcast1, then that instance would only require a Typeable t constraint, which would make it polykinded. To be honest, I'm not sure why gcast1 requires a Data t constraint (I don't use Data that often, so hopefully someone more knowledgeable than me can answer this).<br></span></pre></div>
<br>_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
<br></blockquote></div>