On 16 August 2013 11:35, AntC <anthony_clay...@clear.net.nz> wrote: > There's an annoying inconsistency: > > (CustId 47, CustName "Fred", Gender Male) -- threeple > (CustId 47, CustName "Fred) -- twople > -- (CustId 47) -- oneple not! > () -- nople > > (That is, it's annoying if you're trying to make typeclass instances for > extensible/contractable tuples. Yes, I know I could use HLists.) > > I'm not happy with either approach I've tried: > > data Oneple a = Oneple a -- (or newtype) > (Oneple $ CustId 47) -- too verbose > > type Oneple a = [a] > [CustId 47] -- at least looks bracket-y > > What do you do?
http://hackage.haskell.org/package/OneTuple :p If you really wanted some form of parentheses you could possibly use quasiquoting for it... > > AntC > > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com http://IvanMiljenovic.wordpress.com _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe