diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-04-05 17:39:13 +0200 |
---|---|---|
committer | Sylvain Henry <sylvain@haskus.fr> | 2020-04-18 20:04:46 +0200 |
commit | 15312bbb53f247c9ed2c5cf75100a9f44c1c7227 (patch) | |
tree | 8306dcc04a5b7c82464f903044dfdd589e7fdcd7 /compiler/GHC/Settings/Constants.hs | |
parent | 3ca52151881451ce5b3a7740d003e811b586140d (diff) | |
download | haskell-15312bbb53f247c9ed2c5cf75100a9f44c1c7227.tar.gz |
Modules (#13009)
* SysTools
* Parser
* GHC.Builtin
* GHC.Iface.Recomp
* Settings
Update Haddock submodule
Metric Decrease:
Naperian
parsing001
Diffstat (limited to 'compiler/GHC/Settings/Constants.hs')
-rw-r--r-- | compiler/GHC/Settings/Constants.hs | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/compiler/GHC/Settings/Constants.hs b/compiler/GHC/Settings/Constants.hs new file mode 100644 index 0000000000..92a917e430 --- /dev/null +++ b/compiler/GHC/Settings/Constants.hs @@ -0,0 +1,45 @@ +-- | Compile-time settings +module GHC.Settings.Constants where + +import GhcPrelude + +import Config + +hiVersion :: Integer +hiVersion = read (cProjectVersionInt ++ cProjectPatchLevel) :: Integer + +-- All pretty arbitrary: + +mAX_TUPLE_SIZE :: Int +mAX_TUPLE_SIZE = 62 -- Should really match the number + -- of decls in Data.Tuple + +mAX_CTUPLE_SIZE :: Int -- Constraint tuples +mAX_CTUPLE_SIZE = 62 -- Should match the number of decls in GHC.Classes + +mAX_SUM_SIZE :: Int +mAX_SUM_SIZE = 62 + +-- | Default maximum depth for both class instance search and type family +-- reduction. See also #5395. +mAX_REDUCTION_DEPTH :: Int +mAX_REDUCTION_DEPTH = 200 + +-- | Default maximum constraint-solver iterations +-- Typically there should be very few +mAX_SOLVER_ITERATIONS :: Int +mAX_SOLVER_ITERATIONS = 4 + +wORD64_SIZE :: Int +wORD64_SIZE = 8 + +-- Size of float in bytes. +fLOAT_SIZE :: Int +fLOAT_SIZE = 4 + +-- Size of double in bytes. +dOUBLE_SIZE :: Int +dOUBLE_SIZE = 8 + +tARGET_MAX_CHAR :: Int +tARGET_MAX_CHAR = 0x10ffff |