Closed
Description
In #146 I noticed that the Enum
and Bounded
typeclasses currently have no proper home (currently exposed only via Prelude
and GHC.Enum
). I propose that we remedy this by introducing a pair of new modules, Data.Bounded
and Data.Enum
, to base
:
module Data.Bounded where
class Bounded a where
minBound :: a
maxBound :: a
module Data.Enum where
class Enum a where
succ :: a -> a
pred :: a -> a
toEnum :: GHC.Types.Int -> a
fromEnum :: a -> GHC.Types.Int
enumFrom :: a -> [a]
enumFromThen :: a -> a -> [a]
enumFromTo :: a -> a -> [a]
enumFromThenTo :: a -> a -> a -> [a]