Re: [Haskell-cafe] Re: how would this be done? type classes?existentialtypes?

2006-03-23 Thread Brian Hulley
Ben Rudiak-Gould wrote: Brian Hulley wrote: Is there a reason for using instead of [exists a. Resource a=a] ? Only that = looks like a function arrow, looks like a tuple. I stole this notation from an unpublished paper by SimonPJ et al on adding existential quantification to

Re: [Haskell-cafe] Re: how would this be done? type classes? existentialtypes?

2006-03-19 Thread Matthias Fischmann
On Fri, Mar 17, 2006 at 04:53:42PM +, Ben Rudiak-Gould wrote: Matthias Fischmann wrote: and now it gets interesting: i need instances for Rs on Show, Read, Eq, Ord. Show is very simple, but Read? I think you're right: it's impossible to implement Read for Rs in an extensible way,

[Haskell-cafe] Re: how would this be done? type classes? existentialtypes?

2006-03-17 Thread Ben Rudiak-Gould
Matthias Fischmann wrote: is there any difference between these two? if they are equivalent, why the two different ways to say it? data X where X :: (Resource a) = a - X data Y = forall a . (Resource a) = Y a There's no difference. There are two ways to say it for historical reasons.