On Fri, Oct 3, 2008 at 8:32 PM, Tim Chevalier <[EMAIL PROTECTED]> wrote:
> On Fri, Oct 3, 2008 at 7:24 PM, Luke Palmer <[EMAIL PROTECTED]> wrote:
>> Well, unboxed tuples are not really lifted nor unlifed, since you
>> can't even pass one to a function.
>>
>
> It's true that unboxed tuples are not f
On Fri, Oct 3, 2008 at 7:24 PM, Luke Palmer <[EMAIL PROTECTED]> wrote:
> Well, unboxed tuples are not really lifted nor unlifed, since you
> can't even pass one to a function.
>
It's true that unboxed tuples are not first-class. But what I mean by
"unlifted" is that the type (# Int, Int #), when i
On Fri, Oct 3, 2008 at 7:26 PM, Tim Chevalier <[EMAIL PROTECTED]> wrote:
> On Fri, Oct 3, 2008 at 2:29 PM, Jason Dusek <[EMAIL PROTECTED]> wrote:
>> Lennart Augustsson <[EMAIL PROTECTED]> wrote:
>>> But (a) is not a lifted version of a, whereas (a,b) is a lifted
>>> version of the a b product.
>>>
On Fri, Oct 3, 2008 at 2:29 PM, Jason Dusek <[EMAIL PROTECTED]> wrote:
> Lennart Augustsson <[EMAIL PROTECTED]> wrote:
>> But (a) is not a lifted version of a, whereas (a,b) is a lifted
>> version of the a b product.
>> So it's not consistent, and thereby wrong.
>
> Well, we can't represent the un
Lennart Augustsson <[EMAIL PROTECTED]> wrote:
> But (a) is not a lifted version of a, whereas (a,b) is a lifted
> version of the a b product.
> So it's not consistent, and thereby wrong.
Well, we can't represent the unlifted product in Haskell,
right? You have to use some constructor. So if we
derek.a.elkins:
> On Fri, 2008-10-03 at 15:38 -0400, David Menendez wrote:
> > On Fri, Oct 3, 2008 at 3:17 AM, Jason Dusek <[EMAIL PROTECTED]> wrote:
> > > Perhaps I am lacking in imagination, but I still can't see the
> > > value of one tuples.
> >
> > You can use them to defeat seq.
> >
> > u
On Fri, 2008-10-03 at 15:38 -0400, David Menendez wrote:
> On Fri, Oct 3, 2008 at 3:17 AM, Jason Dusek <[EMAIL PROTECTED]> wrote:
> > Perhaps I am lacking in imagination, but I still can't see the
> > value of one tuples.
>
> You can use them to defeat seq.
>
> undefined `seq` x == undefined
>
But (a) is not a lifted version of a, whereas (a,b) is a lifted
version of the a b product.
So it's not consistent, and thereby wrong.
-- Lennart
On Fri, Oct 3, 2008 at 6:07 PM, Jason Dusek <[EMAIL PROTECTED]> wrote:
> Lennart Augustsson <[EMAIL PROTECTED]> wrote:
>> Let me pick one example. Le
On Fri, Oct 3, 2008 at 3:17 AM, Jason Dusek <[EMAIL PROTECTED]> wrote:
> Perhaps I am lacking in imagination, but I still can't see the
> value of one tuples.
You can use them to defeat seq.
undefined `seq` x == undefined
OneTuple undefined `seq` x == x
That might be useful if a polymorphic fu
Lennart Augustsson <[EMAIL PROTECTED]> wrote:
> Let me pick one example. Let's make a class that can convert
> between tuples and lists.
>
> -- XXX This doesn't work, and is just wrong.
> -- instance TupleList (a) [a] where
> --tupleToList (a) = [a]
> --listToTuple [a] = (a)
It's not cle
Let me pick one example. Let's make a class that can convert between
tuples and lists.
Of course there are restriction when this works, but it can still be useful.
class TupleList t l | t -> l where
tupleToList :: t -> l
listToTuple :: l -> t
instance TupleList () [a] where
tupleToLi
> Quoting Lennart Augustsson <[EMAIL PROTECTED]>:
>
> > But I called it One.
I did a similar one for Yhc, and I think I called it Box. My guess was
that boxing/unboxing wasn't an overloaded enough term :-)
Thanks
Neil
===
Jason Dagit <[EMAIL PROTECTED]> wrote:
> Jason Dusek <[EMAIL PROTECTED]> wrote:
> > John Dorsey <[EMAIL PROTECTED]> wrote:
> > > Now you can:
> > > * Solve any of the software problems that cannot be
> > >solved without the singleton tuple !
> >
> > What would those be? I'm still trying to f
G'day all.
Quoting Lennart Augustsson <[EMAIL PROTECTED]>:
But I called it One.
That's a _terrible_ name. One, surely is (), just as Zero is Void.
While I'm at it, I really don't like the lexical syntax of comments.
Someone should fix that.
Cheers,
Andrew Bromage
__
G'day all.
I asked:
But more to the point: Can it send email?
Quoting John Dorsey <[EMAIL PROTECTED]>:
Can you give an example of a use case?
I don't need one. It's not maximally flexible until it can send email.
Cheers,
Andrew Bromage
___
Has
On 2008 Oct 2, at 19:00, Jason Dagit wrote:
On Thu, Oct 2, 2008 at 2:46 PM, Jason Dusek <[EMAIL PROTECTED]>
wrote:
John Dorsey <[EMAIL PROTECTED]> wrote:
> Now you can:
> * Solve any of the software problems that cannot be solved without
>the singleton tuple !
What would those be? I'm s
Just FYI, at Credit Suisse I wrote a 1-tuple type a few years ago. It
was the only way to get a consistent way of dealing with certain
things.
But I called it One.
I think the OneTuple should be in the base library, I mean, ask an 8
year old what number is missing in this sequence 0,2,3,4,5,6,7,8,
On Thu, Oct 2, 2008 at 2:46 PM, Jason Dusek <[EMAIL PROTECTED]> wrote:
> John Dorsey <[EMAIL PROTECTED]> wrote:
> > Now you can:
> > * Solve any of the software problems that cannot be solved without
> >the singleton tuple !
>
> What would those be? I'm still trying to figure out how a
>
John Dorsey <[EMAIL PROTECTED]> wrote:
> Now you can:
> * Solve any of the software problems that cannot be solved without
>the singleton tuple !
What would those be? I'm still trying to figure out how a
singelton tuple is really distinct from a plain value.
--
_jsn
2008/10/2 John Dorsey <[EMAIL PROTECTED]>:
> All,
>
> I'm bundling responses to save paper.
>
> [EMAIL PROTECTED] wrote:
>> I hope it has a Monad instance.
>
> Naturally!
>
>> But more to the point: Can it send email?
>
> Can you give an example of a use case? Do the Haskell-98 standard
> tuples h
On Thu, Oct 02, 2008 at 03:58:12PM -0400, John Dorsey wrote:
> All,
>
> I'm bundling responses to save paper.
>
> [EMAIL PROTECTED] wrote:
> > I hope it has a Monad instance.
>
> Naturally!
>
> > But more to the point: Can it send email?
>
> Can you give an example of a use case? Do the Hask
All,
I'm bundling responses to save paper.
[EMAIL PROTECTED] wrote:
> I hope it has a Monad instance.
Naturally!
> But more to the point: Can it send email?
Can you give an example of a use case? Do the Haskell-98 standard
tuples have a correspondence feature? I wasn't able to find one with
Hmm, it looks like you forgot to write a Traversable instance. I don't believe:
sequenceA (OneTuple [1,2,3,4]) = _|_
is correct. Here is my contribution!
instance Traversable OneTuple where
sequenceA (OneTuple x) = fmap OneTuple x
Luke
On Thu, Oct 2, 2008 at 12:56 AM, John Dorsey <
On Thu, Oct 2, 2008 at 1:17 AM, Simon Brenner <[EMAIL PROTECTED]> wrote:
> On 10/2/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> G'day all.
>>
>> Quoting John Dorsey <[EMAIL PROTECTED]>:
>>
>>
>> > Contributions are welcome. The project could use a tutorial, and a
>> > decent test suite. S
On 10/2/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> G'day all.
>
> Quoting John Dorsey <[EMAIL PROTECTED]>:
>
>
> > Contributions are welcome. The project could use a tutorial, and a
> > decent test suite. Strict singleton tuples are planned for the next
> > version.
> >
>
> I hope it ha
G'day all.
Quoting John Dorsey <[EMAIL PROTECTED]>:
Contributions are welcome. The project could use a tutorial, and a
decent test suite. Strict singleton tuples are planned for the next
version.
I hope it has a Monad instance.
But more to the point: Can it send email?
Cheers,
Andrew Brom
Fellow Haskellers,
Much attention has been paid over the years to the regrettable
omission of singleton tuples from Haskell.
I am pleased to announce OneTuple, a humble implementation of the
singleton tuple for Haskell. Now you can:
* Wrap a single value of any type in a OneTuple !
* Pattern
27 matches
Mail list logo