240f27781ecd2984eb941847c52f1a275afd4701
[ghc-hetmet.git] / ghc / lib / ghc / PrelBounded.lhs
1 %
2 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1996
3 %
4 \section[PrelBounded]{Module @PrelBounded@}
5
6 Instances of Bounded for various datatypes.
7
8 \begin{code}
9 {-# OPTIONS -fno-implicit-prelude #-}
10
11 module PrelBounded where
12
13 import PrelBase
14 import CCall                            -- for the dependency analyser,
15                                         -- due to the use of litlits below.
16
17 instance Bounded () where
18     minBound = ()
19     maxBound = ()
20
21 instance  Bounded Char  where
22     minBound =  '\0'
23     maxBound =  '\255'
24
25 instance  Bounded Int where
26     minBound =  ``-2147483648''         -- GHC <= 2.09 had this at -2147483647
27     maxBound =  2147483647
28 \end{code}