Does Haskell provide any constants for knowing the limits of
Int? I understand
Int is platform-dependent, but nevertheless I would like to utilize it and to initialize some values at the extremes in my particular case. The equivalent constants (for instance) in C would be
The maximum and minimum bounds for different types are accessed via the
Bounded type-class using the values
The values are polymorphic based on the context they are in, so in some cases you might have to explicitly indicate the type if the compiler is unable to infer it. E.g.
x = minBound :: Int