<div dir="ltr"><div><div>Can you please elaborate why this inconsistency is annoying and what&#39;s the use of OneTuple?<br></div>Genuine question,<br></div>thanks.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Aug 16, 2013 at 5:35 AM, AntC <span dir="ltr">&lt;<a href="mailto:anthony_clayden@clear.net.nz" target="_blank">anthony_clayden@clear.net.nz</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
There&#39;s an annoying inconsistency:<br>
<br>
    (CustId 47, CustName &quot;Fred&quot;, Gender Male)  -- threeple<br>
    (CustId 47, CustName &quot;Fred)                -- twople<br>
--  (CustId 47)                                -- oneple not!<br>
    ()                                         -- nople<br>
<br>
(That is, it&#39;s annoying if you&#39;re trying to make typeclass instances for<br>
extensible/contractable tuples. Yes, I know I could use HLists.)<br>
<br>
I&#39;m not happy with either approach I&#39;ve tried:<br>
<br>
    data Oneple a = Oneple a                   -- (or newtype)<br>
    (Oneple $ CustId 47)                       -- too verbose<br>
<br>
    type Oneple a = [a]<br>
    [CustId 47]                  -- at least looks bracket-y<br>
<br>
What do you do?<br>
<br>
AntC<br>
<br>
<br>
<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><br clear="all"><br>-- <br>Sincerely yours,<br>-- Daniil<br>
</div>