Numeric Classes Quibble

Simon Peyton-Jones simonpj@microsoft.com
Tue, 9 Apr 2002 00:58:18 -0700


I don't think we can run around changing the Haskell 98 class
structure, imperfect though it may be.    Simon

| -----Original Message-----
| From: Ashley Yakeley [mailto:ashley@semantic.org]=20
| Sent: 09 April 2002 04:58
| To: Libraries for Haskell List
| Subject: Numeric Classes Quibble
|=20
|=20
| Currently 'floor' doesn't work on Integers. I think this is=20
| undesirable.
|=20
| I submit that all the members of RealFrac: 'properFraction',=20
| 'truncate',=20
| 'round', 'ceiling' and 'floor' be moved up to Real. I can already=20
| construct them for Integral (the other subclass of Real):
|=20
| 	 properFraction' :: (Integral a,Integral b) =3D> a -> (b,a);
| 	 properFraction' a =3D (fromIntegral a,0);
|=20
| (all the others are derived)
|=20
|=20
| --=20
| Ashley Yakeley, Seattle WA
|=20
| _______________________________________________
| Libraries mailing list
| Libraries@haskell.org=20
| http://www.haskell.org/mailman/listinfo/libraries
|=20