7eda13091769b65a522fa91b13da943a43ac7c58
[ghc.git] / compiler / main / Constants.hs
1 {-
2 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
3
4 \section[Constants]{Info about this compilation}
5 -}
6
7 module Constants (module Constants) where
8
9 import GhcPrelude
10
11 import Config
12
13 hiVersion :: Integer
14 hiVersion = read (cProjectVersionInt ++ cProjectPatchLevel) :: Integer
15
16 -- All pretty arbitrary:
17
18 mAX_TUPLE_SIZE :: Int
19 mAX_TUPLE_SIZE = 62 -- Should really match the number
20 -- of decls in Data.Tuple
21
22 mAX_CTUPLE_SIZE :: Int -- Constraint tuples
23 mAX_CTUPLE_SIZE = 62 -- Should match the number of decls in GHC.Classes
24
25 mAX_SUM_SIZE :: Int
26 mAX_SUM_SIZE = 62
27
28 -- | Default maximum depth for both class instance search and type family
29 -- reduction. See also Trac #5395.
30 mAX_REDUCTION_DEPTH :: Int
31 mAX_REDUCTION_DEPTH = 200
32
33 -- | Default maximum constraint-solver iterations
34 -- Typically there should be very few
35 mAX_SOLVER_ITERATIONS :: Int
36 mAX_SOLVER_ITERATIONS = 4
37
38 wORD64_SIZE :: Int
39 wORD64_SIZE = 8
40
41 -- Size of float in bytes.
42 fLOAT_SIZE :: Int
43 fLOAT_SIZE = 4
44
45 tARGET_MAX_CHAR :: Int
46 tARGET_MAX_CHAR = 0x10ffff