Constrain Min/MaxBound to Ord instances.
This isn’t required, but as profmakx said on IRC, min/max doesn’t make much sense without Ord.
commitfc8da5f797adc08cef93d6fb710711751032fdc7
authorGreg Pfeil <greg@technomadic.org>
dateThu 17 Apr 2014, 15:15 (13 years ago)
parent6f651b0
libs/prelude/Prelude/Classes.idr+2−2
@@ -244,11 +244,11 @@ instance Ord Bits64 where
244244
245245-- ------------------------------------------------------------- [ Bounded ]
246246
247−class MinBound b where
247+class Ord b => MinBound b where
248248 ||| The lower bound for the type
249249 minBound : b
250250
251−class MaxBound b where
251+class Ord b => MaxBound b where
252252 ||| The upper bound for the type
253253 maxBound : b
254254