From ab272eb88f58835d4ad6293813b88d2d6acc23c9 Mon Sep 17 00:00:00 2001 From: "wolfgang.thaller@gmx.net" Date: Sat, 14 Apr 2007 21:40:27 +0000 Subject: [PATCH] make opt_HiVersion an Integer instead of Int to prevent overflow When a snapshot version number is included, opt_HiVersion tends to exceed the range of a 32bit Int. MERGE TO STABLE --- compiler/iface/LoadIface.lhs | 2 +- compiler/main/StaticFlags.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/iface/LoadIface.lhs b/compiler/iface/LoadIface.lhs index 6b2660d..571f96b 100644 --- a/compiler/iface/LoadIface.lhs +++ b/compiler/iface/LoadIface.lhs @@ -567,7 +567,7 @@ pprModIface iface <+> ppr (mi_mod_vers iface) <+> pp_sub_vers <+> (if mi_orphan iface then ptext SLIT("[orphan module]") else empty) <+> (if mi_finsts iface then ptext SLIT("[family instance module]") else empty) - <+> int opt_HiVersion + <+> integer opt_HiVersion <+> ptext SLIT("where") , vcat (map pprExport (mi_exports iface)) , pprDeps (mi_deps iface) diff --git a/compiler/main/StaticFlags.hs b/compiler/main/StaticFlags.hs index 2b67159..3048959 100644 --- a/compiler/main/StaticFlags.hs +++ b/compiler/main/StaticFlags.hs @@ -302,7 +302,7 @@ opt_RulesOff = lookUp FSLIT("-frules-off") opt_MaxWorkerArgs = lookup_def_int "-fmax-worker-args" (10::Int) opt_GranMacros = lookUp FSLIT("-fgransim") -opt_HiVersion = read (cProjectVersionInt ++ cProjectPatchLevel) :: Int +opt_HiVersion = read (cProjectVersionInt ++ cProjectPatchLevel) :: Integer opt_HistorySize = lookup_def_int "-fhistory-size" 20 opt_OmitBlackHoling = lookUp FSLIT("-dno-black-holing") opt_RuntimeTypes = lookUp FSLIT("-fruntime-types") -- 1.7.10.4