On Mon, Mar 07, 2005 at 03:54:07PM +, Keean Schupke wrote:
> >Which almost sounds like a hint to replace the current tuples by
> >HLists in Haskell 2? ;)
> >
> >Something like:
> >
> >infixr 5 :*:
> >data HNil = HNil
> >data HList b => a :*: b = a :*: !b deriving (Eq, Ord)
> >
> >-- type () = H
On Mon, Mar 07, 2005 at 08:47:11PM +0100, Daniel Fischer wrote:
> And, BTW, that's why Keean et al's HList library doesn't help here either,
> the
> type of an HList determines the number of elements and the type of each, so
> there we face the same problems as with nested tuples. What we need i
Daniel Fischer wrote:
> I think, it would be possible to define recursion combinators for specific
> patterns, like this functions takes 4 elements from the stack, this one 3 and
> so on, but then you would need combinators for all these patterns, which is
> rather cumbersome.
Hmm. The sta
Daniel Fischer wrote:
And, BTW, that's why Keean et al's HList library doesn't help here either, the
type of an HList determines the number of elements and the type of each, so
there we face the same problems as with nested tuples. What we need is
type Stack = [ArbitraryType] (from the HList pap
Am Montag, 7. März 2005 17:58 schrieb Greg Buchholz:
> Daniel Fischer wrote:
> > Am Freitag, 4. März 2005 19:35 schrieb Greg Buchholz:
> > > So, can anyone direct me towards more information on exactly
> > > what an "Occurs check" is, or does anyone see an easy fix to my
> > > problems?
> >
> > If
Daniel Fischer wrote:
> Am Freitag, 4. M?rz 2005 19:35 schrieb Greg Buchholz:
> > So, can anyone direct me towards more information on exactly
> > what an "Occurs check" is, or does anyone see an easy fix to my
> > problems?
>
> If I remember correctly, an "occurs check" is checking whether a type
Remi Turk wrote:
On Mon, Mar 07, 2005 at 12:05:41AM +, Keean Schupke wrote:
Daniel Fischer wrote:
The Show instances for tuples aren't automatically derived, they are
defined in GHC.Show. So somewhere there must be an end, probably the
author(s) thought that larger tuples than quintup
On Mon, Mar 07, 2005 at 12:05:41AM +, Keean Schupke wrote:
> Daniel Fischer wrote:
>
> >The Show instances for tuples aren't automatically derived, they are
> >defined in GHC.Show. So somewhere there must be an end, probably the
> >author(s) thought that larger tuples than quintuples aren't
No principled reason. I wish there was no limit, which would involve
generating code on the fly for instances that weren't pre-generated, but
I never got around to implementing that. So you have to stop somewhere.
Actually the Report says it should have Show instances up to 15 at
least, but GHC d