@@ -244,29 +244,30 @@ instance Ord Bits64 where
245-- ------------------------------------------------------------- [ Bounded ]
245-- ------------------------------------------------------------- [ Bounded ]
247−-- | Names the upper and lower elements of a type. Ord is not a superclass of
248−-- Bounded since types that are not totally ordered may also have upper and
250−class Bounded b where
247+class MinBound b where
251 -- | The lower bound for the type
248 -- | The lower bound for the type
252 minBound : b
249 minBound : b
251+class MaxBound b where
253 -- | The upper bound for the type
252 -- | The upper bound for the type
254 maxBound : b
253 maxBound : b
256−instance Bounded () where
260−instance Bounded Bits16 where
255+instance MinBound Bits16 where
261 minBound = 0x0
256 minBound = 0x0
258+instance MaxBound Bits16 where
262 maxBound = 0xffff
259 maxBound = 0xffff
264−instance Bounded Bits32 where
261+instance MinBound Bits32 where
265 minBound = 0x0
262 minBound = 0x0
264+instance MaxBound Bits32 where
266 maxBound = 0xffffffff
265 maxBound = 0xffffffff
268−instance Bounded Bits64 where
267+instance MinBound Bits64 where
269 minBound = 0x0
268 minBound = 0x0
270+instance MaxBound Bits64 where
270 maxBound = 0xffffffffffffffff
271 maxBound = 0xffffffffffffffff