Name of 1-Tuple Data Type

Theodore Lief Gannon tanuki at
Thu Jan 18 02:41:55 UTC 2018

I've seen Only in the wild, and it's probably my favorite of the initial
suggestions for the same reasons as Ryan. Mono is my second pick from that

Id is very clean, but I could see pedagogical issues arising from name
confusion. Sing(le(ton)) is a terrible idea for the same reason.

Venturing my own paint swatch: Solo fits in nicely with the established
size-specific names (pair, triple, etc.) and has all the good traits:
short, self-explanatory, nothing with a confusingly similar name (that I
know of).

On Jan 17, 2018 4:35 PM, "Ryan Reich" <ryan.reich at> wrote:

Only has two virtues I can see easily: it's short (shorter than almost all
the others), and it has the same feel as Maybe.

There is also Id, the name of the mathematical function that this type (and
corresponding data) constructor is. Less pithy but even less intrusive.

On Jan 17, 2018 15:47, "Andrew Martin" <andrew.thaddeus at> wrote:

Required background information: https://ghc.haske

GHC has a one-tuple (both a boxed variant and an unboxed variant). The
unboxed variant currently must be fully applied whenever it is used. This
is in stark contrast to all the other n-tuples (n > 1). It stems entirely
from an issue of syntax. The solution decided on is to provide a normal
prefix name for the 1-tuple. The name that GHC uses internally for this
type is `Unit#` (there is also a boxed variant Unit). However, in the
haskell community, the word "unit" already refers to the nullary tuple, not
the unary tuple. So, we're bikeshedding the name.

Here are some possible options:

* Unary (as in unary tuple)
* Single (as in single, double, triple)
* Singleton (as is singleton, doubleton, tripleton)
* Only (
* OneTuple (
* Uni (means "one" in latin or greek or something like that)
* Mono (means "one" in latin or greek or something like that)

I would appreciate any feedback on the suggestions I provided or any
additional suggestions for the name. If you have concerns about the feature
itself, comment on the GHC Trac ticket. I'd prefer to keep this thread
focused on just the problem of coming up with a name.

-Andrew Thaddeus Martin

Libraries mailing list
Libraries at

Libraries mailing list
Libraries at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list