From 25d4d23b6b1e4915ddf2a6edd039a993a3bdf6d0 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Thu, 21 Jan 2010 15:49:40 -0500 Subject: [PATCH] doc: Add rationale behind the Roundable class. --- Data/Floating/Classes.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Data/Floating/Classes.hs b/Data/Floating/Classes.hs index f9611cd..717a218 100644 --- a/Data/Floating/Classes.hs +++ b/Data/Floating/Classes.hs @@ -18,7 +18,9 @@ import Data.Poset data FPClassification = FPInfinite | FPNaN | FPNormal | FPSubNormal | FPZero deriving (Show, Read, Eq, Enum, Bounded) --- | Class for types which can be rounded to integers. +-- | Class for types which can be rounded to integers. The rounding functions +-- in the Prelude are inadequate for floating point because they shoehorn their +-- results into an integral type. -- -- Minimal complete definition: 'toIntegral' and 'round'. class (Fractional a, Poset a) => Roundable a where -- 2.11.4.GIT