summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-06-18 21:44:52 +0100
committerIan Lynagh <igloo@earth.li>2012-06-18 21:58:57 +0100
commit32fd3547544ad3075da06f46aad3e85fd5887706 (patch)
tree18c44f63c96f0425f8a0c6666041690d19e4a847 /compiler
parentd361262b601c90512176e3dbc4a65c02d73a234d (diff)
downloadhaskell-32fd3547544ad3075da06f46aad3e85fd5887706.tar.gz
Move and rename opt_HiVersion
It isn't really an option at all
Diffstat (limited to 'compiler')
-rw-r--r--compiler/iface/BinIface.hs4
-rw-r--r--compiler/iface/LoadIface.lhs4
-rw-r--r--compiler/main/Constants.lhs4
-rw-r--r--compiler/main/StaticFlags.hs4
4 files changed, 8 insertions, 8 deletions
diff --git a/compiler/iface/BinIface.hs b/compiler/iface/BinIface.hs
index 799438086a..f749f97cdb 100644
--- a/compiler/iface/BinIface.hs
+++ b/compiler/iface/BinIface.hs
@@ -122,7 +122,7 @@ readBinIface_ dflags checkHiWay traceBinIFaceReading hi_path ncu = do
-- Check the interface file version and ways.
check_ver <- get bh
- let our_ver = show opt_HiVersion
+ let our_ver = show hiVersion
wantedGot "Version" our_ver check_ver
errorOnMismatch "mismatched interface file versions" our_ver check_ver
@@ -172,7 +172,7 @@ writeBinIface dflags hi_path mod_iface = do
else Binary.put_ bh (0 :: Word64)
-- The version and way descriptor go next
- put_ bh (show opt_HiVersion)
+ put_ bh (show hiVersion)
let way_descr = getWayDescr dflags
put_ bh way_descr
diff --git a/compiler/iface/LoadIface.lhs b/compiler/iface/LoadIface.lhs
index 4430b84760..493e18b825 100644
--- a/compiler/iface/LoadIface.lhs
+++ b/compiler/iface/LoadIface.lhs
@@ -34,6 +34,7 @@ import HscTypes
import BasicTypes hiding (SuccessFlag(..))
import TcRnMonad
+import Constants
import PrelNames
import PrelInfo
import MkId ( seqId )
@@ -50,7 +51,6 @@ import ErrUtils
import Finder
import UniqFM
import SrcLoc
-import StaticFlags
import Outputable
import BinIface
import Panic
@@ -658,7 +658,7 @@ pprModIface iface
<+> (if mi_orphan iface then ptext (sLit "[orphan module]") else empty)
<+> (if mi_finsts iface then ptext (sLit "[family instance module]") else empty)
<+> (if mi_hpc iface then ptext (sLit "[hpc]") else empty)
- <+> integer opt_HiVersion
+ <+> integer hiVersion
, nest 2 (text "interface hash:" <+> ppr (mi_iface_hash iface))
, nest 2 (text "ABI hash:" <+> ppr (mi_mod_hash iface))
, nest 2 (text "export-list hash:" <+> ppr (mi_exp_hash iface))
diff --git a/compiler/main/Constants.lhs b/compiler/main/Constants.lhs
index 2e276f64c6..0cecb82f1a 100644
--- a/compiler/main/Constants.lhs
+++ b/compiler/main/Constants.lhs
@@ -13,8 +13,12 @@
module Constants (module Constants) where
+import Config
+
#include "ghc_boot_platform.h"
#include "../includes/HaskellConstants.hs"
+hiVersion :: Integer
+hiVersion = read (cProjectVersionInt ++ cProjectPatchLevel) :: Integer
\end{code}
diff --git a/compiler/main/StaticFlags.hs b/compiler/main/StaticFlags.hs
index 966c2fab09..0b58fdde96 100644
--- a/compiler/main/StaticFlags.hs
+++ b/compiler/main/StaticFlags.hs
@@ -77,7 +77,6 @@ module StaticFlags (
-- misc opts
opt_ErrorSpans,
opt_GranMacros,
- opt_HiVersion,
opt_HistorySize,
opt_Unregisterised,
v_Ld_inputs,
@@ -283,9 +282,6 @@ opt_MaxWorkerArgs = lookup_def_int "-fmax-worker-args" (10::Int)
opt_GranMacros :: Bool
opt_GranMacros = lookUp (fsLit "-fgransim")
-opt_HiVersion :: Integer
-opt_HiVersion = read (cProjectVersionInt ++ cProjectPatchLevel) :: Integer
-
opt_HistorySize :: Int
opt_HistorySize = lookup_def_int "-fhistory-size" 20