Unit unboxed tuples

David Menendez dave at zednenem.com
Sat Dec 24 17:43:50 CET 2011


On Sat, Dec 24, 2011 at 7:15 AM, Duncan Coutts
<duncan.coutts at googlemail.com> wrote:
> On 23 December 2011 20:09, Stefan Holdermans <stefan at vectorfabrics.com> wrote:
>>> Here are the kinds of the type constructors:
>>>
>>>                 (,,) :: * -> * -> * -> *
>>>                 (,) :: * -> * -> *
>>>                 () :: *
>>>
>>>                 (# ,, #) :: * -> * -> * -> #
>>>                 (# , #) :: *  -> * -> #
>>> BUT
>>>                 (#  #) :: * -> #
>>
>> Just of out curiosity, what would be a compelling use case for singleton and unit unboxed tuples?
>
> For singleton unboxed tuples, any situation where you want to return a
> single value but not force its evaluation. This occurs for example
> with some low level functions in the implementation of ordinary lazy
> arrays.

How is that different from returning a normal value?

-- 
Dave Menendez <dave at zednenem.com>
<http://www.eyrie.org/~zednenem/>



More information about the Glasgow-haskell-users mailing list