17 May
2005
17 May
'05
4:42 a.m.
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 not part of the current syntax, but I hope you get the picture. What are the elegant ways of doing this?
How about f :: Real a => Extended a -> Extended a Double and Float already include -Infinity and +Infinity: Prelude> -(1/0) :: Double -Infinity Best regards Tomasz