On 10/01/2012 16:18, Dan Doel wrote:
Copying the list, sorry. I have a lot of trouble replying correctly
with gmail's interface for some reason. :)
On Tue, Jan 10, 2012 at 11:14 AM, Dan Doeldan.d...@gmail.com wrote:
On Tue, Jan 10, 2012 at 5:01 AM, Simon Marlowmarlo...@gmail.com wrote:
On
On January 11, 2012 08:41:04 Simon Marlow wrote:
On 10/01/2012 16:18, Dan Doel wrote:
Does the difference have to do with unboxed types? For instance:
foo :: () - Int#
foo _ = foo ()
bar :: () - (# Int# #)
bar _ = (# foo () #)
baz = case bar () of _ - 5
On Wed, Jan 11, 2012 at 8:41 AM, Simon Marlow marlo...@gmail.com wrote:
On 10/01/2012 16:18, Dan Doel wrote:
Copying the list, sorry. I have a lot of trouble replying correctly
with gmail's interface for some reason. :)
On Tue, Jan 10, 2012 at 11:14 AM, Dan Doeldan.d...@gmail.com wrote:
On 09/01/2012 04:46, wren ng thornton wrote:
On 12/23/11 8:34 AM, Simon Peyton-Jones wrote:
More uniform! If you the singleton-unboxed-tuple data constructor in
source code, as a function, you'd write (\x - (# x #)). In a pattern,
or applied, you'd write (# x #).
Shouldn't (# T #) be
On January 8, 2012 23:49:47 wren ng thornton wrote:
An alternative is to distinguish, say, (# x #) and its spaceful
constructor (# #) from the spaceless (##); and analogously for the boxed
tuples, though that introduces confusion about parentheses for boxing vs
parentheses for grouping.
I
Copying the list, sorry. I have a lot of trouble replying correctly
with gmail's interface for some reason. :)
On Tue, Jan 10, 2012 at 11:14 AM, Dan Doel dan.d...@gmail.com wrote:
On Tue, Jan 10, 2012 at 5:01 AM, Simon Marlow marlo...@gmail.com wrote:
On 09/01/2012 04:46, wren ng thornton
On 1/10/12 10:31 AM, Tyson Whitehead wrote:
On January 8, 2012 23:49:47 wren ng thornton wrote:
An alternative is to distinguish, say, (# x #) and its spaceful
constructor (# #) from the spaceless (##); and analogously for the boxed
tuples, though that introduces confusion about parentheses for
On 12/23/11 8:34 AM, Simon Peyton-Jones wrote:
More uniform! If you the singleton-unboxed-tuple data constructor in source code,
as a function, you'd write (\x - (# x #)). In a pattern, or applied, you'd
write (# x #).
Shouldn't (# T #) be identical to T?
I know that a putative (T)
On 12/23/11 12:57 PM, Tyson Whitehead wrote:
On December 23, 2011 09:37:04 Ganesh Sittampalam wrote:
On 23/12/2011 13:46, Ian Lynagh wrote:
On Fri, Dec 23, 2011 at 01:34:49PM +, Simon Peyton-Jones wrote:
Arguments Boxed Unboxed
3 ( , , )(# , , #)
2 ( , )
| 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
Quoting Simon Peyton-Jones simo...@microsoft.com:
for example. Singleton unboxed tuples are a perfectly valid data
type; it's just that we don't (now) have a name for their constructor.
Well, Haskell *does* have a mechanism for giving two different
implementations to a particular name...
Duncan,
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
:
(,,) :: * - * - * - *
(,) :: * - * - *
() :: *
(# ,, #) :: * - * - * - #
(# , #) :: * - * - #
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
Dear GHC users
I've just discovered something very peculiar with unboxed tuples in GHC.
f2 x = (# True, False #)
f1 x = (# True #)
f0 x = (# #)
What types do these functions have?
f2 :: a - (# Bool, Bool #)
f1 :: a
On Fri, Dec 23, 2011 at 12:46:38PM +, Simon Peyton-Jones wrote:
Dear GHC users
I've just discovered something very peculiar with unboxed tuples in GHC.
The problem is that there is no boxed singleton tuple, whereas there is
an unboxed singleton tuple, so there is a conflict between the
Message-
| From: glasgow-haskell-users-boun...@haskell.org [mailto:glasgow-haskell-
| users-boun...@haskell.org] On Behalf Of Ian Lynagh
| Sent: 23 December 2011 13:17
| To: glasgow-haskell-users@haskell.org
| Subject: Re: Unit unboxed tuples
|
| On Fri, Dec 23, 2011 at 12:46:38PM +, Simon
On Fri, Dec 23, 2011 at 01:34:49PM +, Simon Peyton-Jones wrote:
Arguments Boxed Unboxed
3 ( , , )(# , , #)
2 ( , ) (# , #)
1
0 () (# #)
Simple, uniform.
Uniform horizontally, but strange vertically!
On 23/12/2011 13:46, Ian Lynagh wrote:
On Fri, Dec 23, 2011 at 01:34:49PM +, Simon Peyton-Jones wrote:
Arguments Boxed Unboxed
3 ( , , )(# , , #)
2 ( , ) (# , #)
1
0 () (# #)
Simple, uniform.
Uniform
:37
| To: glasgow-haskell-users@haskell.org
| Subject: Re: Unit unboxed tuples
|
| On 23/12/2011 13:46, Ian Lynagh wrote:
| On Fri, Dec 23, 2011 at 01:34:49PM +, Simon Peyton-Jones wrote:
|
| Arguments Boxed Unboxed
| 3 ( , , )(# , , #)
| 2
Hi,
I have to second that. I recently fell over that problem when writing
instances for certain kinds of tuples. In libraries, such as tuple
there is a special 'OneTuple' constructor but I'd really appreciate a
more uniform fix -- but don't know of one either...
Gruss,
Christian
* Ganesh
On December 23, 2011 09:37:04 Ganesh Sittampalam wrote:
On 23/12/2011 13:46, Ian Lynagh wrote:
On Fri, Dec 23, 2011 at 01:34:49PM +, Simon Peyton-Jones wrote:
Arguments Boxed Unboxed
3 ( , , )(# , , #)
2 ( , ) (# , #)
1
0 () (#
would be a compelling use case for singleton and
unit unboxed tuples?
Cheers,
Stefan
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
22 matches
Mail list logo