Name of 1-Tuple Data Type

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Thu Jan 18 09:05:04 UTC 2018


On 18 January 2018 at 19:25, Andreas Abel <abela at chalmers.se> wrote:
> -1.
>
> Don't grap any of these nice names for that obscure feature.  Take some ugly
> name.

It seems like an obscure feature, but something similar has been
re-implemented by a suprising number of libraries (vector,
postgresql-simple, cassava, etc.).  Typically when you want to
differentiate a raw value from a (possible singular) collection of
values (e.g. field vs row).

>
> On 18.01.2018 00:46, Andrew Martin wrote:
>>
>> Required background information:
>> https://ghc.haskell.org/trac/ghc/ticket/14673
>>
>> 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
>> (https://hackage.haskell.org/package/Only-0.1/docs/Data-Tuple-Only.html)
>> * OneTuple
>> (https://hackage.haskell.org/package/OneTuple-0.2.1/docs/Data-Tuple-OneTuple.html)
>> * 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.
>
>
>
> --
> Andreas Abel  <><      Du bist der geliebte Mensch.
>
> Department of Computer Science and Engineering
> Chalmers and Gothenburg University, Sweden
>
> andreas.abel at gu.se
> http://www.cse.chalmers.se/~abela/
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries



-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
http://IvanMiljenovic.wordpress.com


More information about the Libraries mailing list