<div>Tom,</div>
<div> </div>
<div>Yes of course it is simplified for clarity.</div>
<div> </div>
<div>Here is a modified version where fb does something (a bit more usefull)</div>
<div> </div>
<div>    <br><font face="courier new,monospace">class PP m where<br>    create :: a -> m a</font></div>
<div><font face="Courier New"></font> </div>
<div><font face="courier new,monospace">data A a = A a </font></div>
<div><font face="courier new,monospace">instance PP A where <br>    create a = A a</font></div>
<div><br><font face="courier new,monospace">class CB a where<br>    fb :: a -> a</font></div>
<div><font face="courier new,monospace"></font> </div>
<div><font face="courier new,monospace">data B m a = B (m a) </font></div>
<div><font face="courier new,monospace">instance (PP m) => PP (B m) where<br>    create a =  let a' = fb a <br>                in B (create a')</font></div>
<div><font face="courier new,monospace"></font> </div>
<div><font face="courier new,monospace">class PP' m a where<br>    create' :: a -> m a</font></div>
<div><font face="courier new,monospace">    <br>instance (PP m) => PP' m a where<br>    create' = create    </font></div>
<div><br><font face="courier new,monospace">instance (PP m, CB a) => PP' (B m) a where<br>    create' a = let a' = fb a <br>                in B (create a')</font></div>
<div> </div>
<div>Actually I ran into that problem when trying to add a kind of rule engine layer above the Persistent typeclass. Given the complexity of these typeclass, I think it is more practical to reason about a simpler form of the same problem.</div>

<div> </div>
<div>Thanks</div>
<div> </div>
<div>J-C <br><br></div>
<div class="gmail_quote">On Tue, Apr 8, 2014 at 9:42 AM, Tom Ellis <span dir="ltr"><<a href="mailto:tom-lists-haskell-cafe-2013@jaguarpaw.co.uk" target="_blank">tom-lists-haskell-cafe-2013@jaguarpaw.co.uk</a>></span> wrote:<br>

<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div>On Tue, Apr 08, 2014 at 09:25:17AM +0200, jean-christophe mincke wrote:<br>> instance (PP m) => PP (B m) where<br>>     create a =  let _ = fb a<br>>                 in B (create a)<br><br></div>Your use of 'fb' here is baffling.  Am I right in thinking you have tried to<br>
simplify your problem for clarity?  If so I think you have simplified too<br>far!<br><br>Could you give an example where the use of 'fb' actually matters?<br><br>Tom<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><br>