[Haskell-cafe] Data types and Haskell classes

2005-05-16 Thread Jens Blanck
How would I introduce number classes that are extended with plus and minus infinity? I'd like to have polymorphism over these new classes, something like a signature f :: (Real a, Extended a b) => b -> b which clearly is not part of the current syntax, but I hope you get the picture. What are the

Re: [Haskell-cafe] Data types and Haskell classes

2005-05-16 Thread Tomasz Zielonka
On Mon, May 16, 2005 at 09:26:07PM +0200, Jens Blanck wrote: > How would I introduce number classes that are extended with plus and > minus infinity? I'd like to have polymorphism over these new classes, > something like a signature > > f :: (Real a, Extended a b) => b -> b > > which clearly is n

Re: [Haskell-cafe] Data types and Haskell classes

2005-05-17 Thread Jens Blanck
> > How would I introduce number classes that are extended with plus and > > minus infinity? I'd like to have polymorphism over these new classes, > > something like a signature > > > > f :: (Real a, Extended a b) => b -> b > > > > which clearly is not part of the current syntax, but I hope you get

Re: [Haskell-cafe] Data types and Haskell classes

2005-05-18 Thread Dylan Thurston
On Tue, May 17, 2005 at 01:13:17PM +0200, Jens Blanck wrote: > > > How would I introduce number classes that are extended with plus and > > > minus infinity? I'd like to have polymorphism over these new classes, > > > something like a signature > > > > > > f :: (Real a, Extended a b) => b -> b > >