From 19963f4b29f226ecbb659075f18339e57667db4c Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Tue, 23 Feb 2010 22:13:19 -0500 Subject: [PATCH] floating: Add a Sortable constraint for PrimFloat. Every instance of this class should be sortable, thus we don't need to pollute type signatures elsewhere. --- Data/Floating/Types/Core.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Data/Floating/Types/Core.hs b/Data/Floating/Types/Core.hs index d3c2ff3..092d4b6 100644 --- a/Data/Floating/Types/Core.hs +++ b/Data/Floating/Types/Core.hs @@ -13,8 +13,10 @@ module Data.Floating.Types.Core where import Prelude hiding (Double, Float, Ord(..), RealFrac(..), Floating(..), RealFloat(..)) + import Data.Ratio import Data.Roundable +import Data.Poset import GHC.Integer import GHC.Prim @@ -117,7 +119,7 @@ class Floating a => RealFloat a where pi = 4 * atan 1 -- | Class for the basic floating point types. -class (Roundable a, RealFloat a) => PrimFloat a where +class (Roundable a, Sortable a, RealFloat a) => PrimFloat a where -- | Radix of significand digits. floatRadix :: Num b => a -> b -- | Number of digits in the significand. -- 2.11.4.GIT