switchIsOn,
maybe_CompilingGhcInternals,
- opt_AllDemanded,
opt_AllStrict,
opt_AutoSccsOnAllToplevs,
opt_AutoSccsOnExportedToplevs,
opt_CompilingGhcInternals,
opt_D_dump_absC,
opt_D_dump_asm,
- opt_D_dump_deforest,
opt_D_dump_deriv,
opt_D_dump_ds,
opt_D_dump_flatC,
opt_DoTickyProfiling,
opt_EnsureSplittableC,
opt_FoldrBuildOn,
- opt_FoldrBuildTrace,
opt_ForConcurrent,
opt_GlasgowExts,
opt_GranMacros,
opt_HiMap,
opt_IgnoreIfacePragmas,
- opt_IgnoreStrictnessPragmas,
- opt_IrrefutableEverything,
opt_IrrefutableTuples,
opt_LiberateCaseThreshold,
opt_NoImplicitPrelude,
opt_NumbersStrict,
opt_OmitBlackHoling,
- opt_OmitDefaultInstanceMethods,
opt_OmitInterfacePragmas,
opt_PprStyle_All,
opt_PprStyle_Debug,
opt_SccGroup,
opt_SccProfilingOn,
opt_ShowImportSpecs,
- opt_ShowPragmaNameErrs,
opt_SigsRequired,
opt_SourceUnchanged,
opt_SpecialiseAll,
opt_UnfoldingCreationThreshold,
opt_UnfoldingConDiscount,
opt_UnfoldingUseThreshold,
+ opt_UnfoldingKeenessFactor,
opt_Verbose,
opt_WarnNameShadowing,
opt_WarnUnusedNames,
- opt_WarnIncompletePatterns, opt_WarnOverlappedPatterns,
+ opt_WarnIncompletePatterns, opt_WarnOverlappedPatterns, opt_WarnSimplePatterns,
+ opt_WarnMissingMethods,
+ opt_WarnDuplicateExports,
opt_PruneTyDecls, opt_PruneInstDecls,
opt_D_show_unused_imports,
opt_D_show_rn_stats,
#else
import GlaExts
import ArrBase
+#if __GLASGOW_HASKELL__ >= 209
+import Addr
+#endif
-- 2.04 and later exports Lift from GlaExts
#if __GLASGOW_HASKELL__ < 204
import PrelBase (Lift(..))
| CoreDoStaticArgs
| CoreDoStrictness
| CoreDoSpecialising
- | CoreDoDeforest
| CoreDoFoldrBuildWorkerWrapper
| CoreDoFoldrBuildWWAnal
\end{code}
%************************************************************************
\begin{code}
-lookUp :: FAST_STRING -> Bool
-lookup_int :: String -> Maybe Int
-lookup_def_int :: String -> Int -> Int
-lookup_str :: String -> Maybe String
+lookUp :: FAST_STRING -> Bool
+lookup_int :: String -> Maybe Int
+lookup_def_int :: String -> Int -> Int
+lookup_def_float :: String -> Float -> Float
+lookup_str :: String -> Maybe String
lookUp sw = maybeToBool (assoc_opts sw)
Nothing -> def -- Use default
Just xx -> read xx
+lookup_def_float sw def = case (lookup_str sw) of
+ Nothing -> def -- Use default
+ Just xx -> read xx
+
assoc_opts = assocMaybe [ (a, True) | a <- argv ]
unpacked_opts = map _UNPK_ argv
\end{code}
\begin{code}
-opt_AllDemanded = lookUp SLIT("-fall-demanded")
opt_AllStrict = lookUp SLIT("-fall-strict")
opt_AutoSccsOnAllToplevs = lookUp SLIT("-fauto-sccs-on-all-toplevs")
opt_AutoSccsOnExportedToplevs = lookUp SLIT("-fauto-sccs-on-exported-toplevs")
maybe_CompilingGhcInternals = lookup_str "-fcompiling-ghc-internals="
opt_D_dump_absC = lookUp SLIT("-ddump-absC")
opt_D_dump_asm = lookUp SLIT("-ddump-asm")
-opt_D_dump_deforest = lookUp SLIT("-ddump-deforest")
opt_D_dump_deriv = lookUp SLIT("-ddump-deriv")
opt_D_dump_ds = lookUp SLIT("-ddump-ds")
opt_D_dump_flatC = lookUp SLIT("-ddump-flatC")
opt_DoEtaReduction = lookUp SLIT("-fdo-eta-reduction")
opt_EnsureSplittableC = lookUp SLIT("-fglobalise-toplev-names")
opt_FoldrBuildOn = lookUp SLIT("-ffoldr-build-on")
-opt_FoldrBuildTrace = lookUp SLIT("-ffoldr-build-trace")
opt_ForConcurrent = lookUp SLIT("-fconcurrent")
opt_GranMacros = lookUp SLIT("-fgransim")
opt_GlasgowExts = lookUp SLIT("-fglasgow-exts")
--UNUSED:opt_Haskell_1_3 = lookUp SLIT("-fhaskell-1.3")
opt_HiMap = lookup_str "-himap=" -- file saying where to look for .hi files
opt_IgnoreIfacePragmas = lookUp SLIT("-fignore-interface-pragmas")
-opt_IgnoreStrictnessPragmas = lookUp SLIT("-fignore-strictness-pragmas")
-opt_IrrefutableEverything = lookUp SLIT("-firrefutable-everything")
opt_IrrefutableTuples = lookUp SLIT("-firrefutable-tuples")
opt_NoImplicitPrelude = lookUp SLIT("-fno-implicit-prelude")
opt_NumbersStrict = lookUp SLIT("-fnumbers-strict")
opt_OmitBlackHoling = lookUp SLIT("-dno-black-holing")
-opt_OmitDefaultInstanceMethods = lookUp SLIT("-fomit-default-instance-methods")
opt_OmitInterfacePragmas = lookUp SLIT("-fomit-interface-pragmas")
opt_PprStyle_All = lookUp SLIT("-dppr-all")
opt_PprStyle_Debug = lookUp SLIT("-dppr-debug")
opt_ReportWhyUnfoldingsDisallowed= lookUp SLIT("-freport-disallowed-unfoldings")
opt_SccProfilingOn = lookUp SLIT("-fscc-profiling")
opt_ShowImportSpecs = lookUp SLIT("-fshow-import-specs")
-opt_ShowPragmaNameErrs = lookUp SLIT("-fshow-pragma-name-errs")
opt_SigsRequired = lookUp SLIT("-fsignatures-required")
opt_SourceUnchanged = lookUp SLIT("-fsource-unchanged")
opt_SpecialiseAll = lookUp SLIT("-fspecialise-all")
opt_UnfoldingConDiscount = lookup_def_int "-funfolding-con-discount" uNFOLDING_CON_DISCOUNT_WEIGHT
opt_LiberateCaseThreshold = lookup_def_int "-fliberate-case-threshold" lIBERATE_CASE_THRESHOLD
+opt_UnfoldingKeenessFactor = lookup_def_float "-funfolding-keeness-factor" uNFOLDING_KEENESS_FACTOR
opt_WarnNameShadowing = lookUp SLIT("-fwarn-name-shadowing")
-opt_WarnIncompletePatterns = not (lookUp SLIT("-fno-warn-incomplete-patterns"))
-opt_WarnOverlappedPatterns = not (lookUp SLIT("-fno-warn-overlapped-patterns"))
+opt_WarnIncompletePatterns = lookUp SLIT("-fwarn-incomplete-patterns")
+opt_WarnOverlappedPatterns = lookUp SLIT("-fwarn-overlapped-patterns")
+opt_WarnSimplePatterns = lookUp SLIT("-fwarn-simple-patterns")
opt_WarnUnusedNames = lookUp SLIT("-fwarn-unused-names")
+opt_WarnMissingMethods = lookUp SLIT("-fwarn-missing-methods")
+opt_WarnDuplicateExports = lookUp SLIT("-fwarn-duplicate-exports")
opt_PruneTyDecls = not (lookUp SLIT("-fno-prune-tydecls"))
opt_PruneInstDecls = not (lookUp SLIT("-fno-prune-instdecls"))
opt_D_show_unused_imports = lookUp SLIT("-dshow-unused-imports")
"-fstatic-args" -> CORE_TD(CoreDoStaticArgs)
"-fstrictness" -> CORE_TD(CoreDoStrictness)
"-fspecialise" -> CORE_TD(CoreDoSpecialising)
- "-fdeforest" -> CORE_TD(CoreDoDeforest)
"-ffoldr-build-worker-wrapper" -> CORE_TD(CoreDoFoldrBuildWorkerWrapper)
"-ffoldr-build-ww-anal" -> CORE_TD(CoreDoFoldrBuildWWAnal)