<div dir="ltr">For the &quot;consistency&quot; you want, `data Oneple a = T a` is the best you can do in Haskell.<div><br></div><div>T(CustId 47) is just one character off from what you actually want to write: (Cust 47). And I presume you want the &quot;extra bottom&quot; that comes with this, as opposed to just treating values as their own one-tuples.</div>

<div><br></div><div>I imagine you could write some fancy hack that uses the type system to automatically promote values to Oneples of the given value when an &quot;expected: Oneple Foo, actual: Foo&quot; error occurs. But this would not be very useful in general.</div>

<div><br></div><div>An uglier option:</div><div><br></div><div>type Oneple a = (a, ())</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div>-- Dan Burton</div>
<br><br><div class="gmail_quote">On Thu, Aug 15, 2013 at 7:05 PM, Ivan Lazar Miljenovic <span dir="ltr">&lt;<a href="mailto:ivan.miljenovic@gmail.com" target="_blank">ivan.miljenovic@gmail.com</a>&gt;</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 16 August 2013 11:35, AntC &lt;<a href="mailto:anthony_clayden@clear.net.nz">anthony_clayden@clear.net.nz</a>&gt; wrote:<br>
&gt; There&#39;s an annoying inconsistency:<br>
&gt;<br>
&gt;     (CustId 47, CustName &quot;Fred&quot;, Gender Male)  -- threeple<br>
&gt;     (CustId 47, CustName &quot;Fred)                -- twople<br>
&gt; --  (CustId 47)                                -- oneple not!<br>
&gt;     ()                                         -- nople<br>
&gt;<br>
&gt; (That is, it&#39;s annoying if you&#39;re trying to make typeclass instances for<br>
&gt; extensible/contractable tuples. Yes, I know I could use HLists.)<br>
&gt;<br>
&gt; I&#39;m not happy with either approach I&#39;ve tried:<br>
&gt;<br>
&gt;     data Oneple a = Oneple a                   -- (or newtype)<br>
&gt;     (Oneple $ CustId 47)                       -- too verbose<br>
&gt;<br>
&gt;     type Oneple a = [a]<br>
&gt;     [CustId 47]                  -- at least looks bracket-y<br>
&gt;<br>
&gt; What do you do?<br>
<br>
</div><a href="http://hackage.haskell.org/package/OneTuple" target="_blank">http://hackage.haskell.org/package/OneTuple</a> :p<br>
<br>
If you really wanted some form of parentheses you could possibly use<br>
quasiquoting for it...<br>
<div class="im HOEnZb"><br>
&gt;<br>
&gt; AntC<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Haskell-Cafe mailing list<br>
&gt; <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br>
<br>
<br>
</div><span class="HOEnZb"><font color="#888888">--<br>
Ivan Lazar Miljenovic<br>
<a href="mailto:Ivan.Miljenovic@gmail.com">Ivan.Miljenovic@gmail.com</a><br>
<a href="http://IvanMiljenovic.wordpress.com" target="_blank">http://IvanMiljenovic.wordpress.com</a><br>
</font></span><div class="HOEnZb"><div class="h5"><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>
</div></div></blockquote></div><br></div>