<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div>
<div>On 20 Sep 2012, at 09:40, José Pedro Magalhães wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">
instance Data a =&gt; Data (Bag a) where<br>
&nbsp; gfoldl k z b = z listToBag `k` bagToList b -- traverse abstract type abstractly<br>
&nbsp; toConstr _ &nbsp; = abstractConstr $ &quot;Bag(&quot;&#43;&#43;show (typeOf (undefined::a))&#43;&#43;&quot;)&quot;<br>
&nbsp; gunfold _ _ &nbsp;= error &quot;gunfold&quot;<br>
&nbsp; dataTypeOf _ = mkNoRepType &quot;Bag&quot;<br>
</blockquote>
<div><br>
Btw, where is this instance defined?<br>
</div>
</div>
</blockquote>
</div>
<br>
<div>GHCROOT/compiler/utils/Bag.lhs, lines 266-270 (current git-repo HEAD and many versions previously).</div>
<div><br>
</div>
<div>Ph.</div>
</body>
</html>