<div dir="ltr">Hey that's a great idea!</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 29, 2013 at 7:18 PM, 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 class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Tue, Oct 29, 2013 at 04:31:49AM +0000, AntC wrote:<br>
> > Lyndon Maydwell <maydwell <at> <a href="http://gmail.com" target="_blank">gmail.com</a>> writes:<br>
> ><br>
> > I was wondering if it's possible to have automatic deriving<br>
> > for some classes for the Void type. ...<br>
><br>
> Hi Lyndon, I'm struggling to see any use case for that.<br>
><br>
> You'd 'achieve' `show (undefined :: Nada)` crashing your program at run-<br>
> time; rather than failing to compile (if you didn't have the instance).<br>
><br>
> Just bite the bullet and give your Void type a constructor.<br>
<br>
</div>It was considered a worthwhile enough idea to add a Show instance to the<br>
"void" package<br>
<br>
    <a href="http://hackage.haskell.org/package/void-0.6.1/docs/Data-Void.html" target="_blank">http://hackage.haskell.org/package/void-0.6.1/docs/Data-Void.html</a><br>
<br>
(where the instance was written by hand, of course, not derived).<br>
<br>
Lyndon: perhaps<br>
<br>
    import Data.Void<br>
<br>
    newtype Nada = Nada Void deriving (Show)<br>
<br>
will suit you use case.<br>
<span class="HOEnZb"><font color="#888888"><br>
Tom<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div>