import System.IO.Unsafe ( unsafePerformIO )
import Control.Monad ( when )
import Data.Char ( isDigit )
-import Data.List ( sort, intersperse, nub )
+import Data.List
-----------------------------------------------------------------------------
-- Static flags
, ( "dppr-user-length", AnySuffix addOpt )
-- rest of the debugging flags are dynamic
- --------- Haskell Program Coverage -----------------------------------
-
- , ( "fhpc" , PassFlag addOpt )
- , ( "fhpc-tracer" , PassFlag addOpt )
-
--------- Profiling --------------------------------------------------
, ( "auto-all" , NoArg (addOpt "-fauto-sccs-on-all-toplevs") )
, ( "auto" , NoArg (addOpt "-fauto-sccs-on-exported-toplevs") )
opt_SccProfilingOn = lookUp FSLIT("-fscc-profiling")
opt_DoTickyProfiling = WayTicky `elem` (unsafePerformIO $ readIORef v_Ways)
--- Hpc opts, only work in a stage2 build
-#if GHCI
+-- Hpc opts
opt_Hpc = lookUp FSLIT("-fhpc")
-#else
-opt_Hpc = False
-#endif
-- language opts
opt_DictsStrict = lookUp FSLIT("-fdicts-strict")
"fext-core",
"fcpr-off",
"ferror-spans",
- "fPIC"
+ "fPIC",
+ "fhpc"
]
- || any (flip prefixMatch f) [
+ || any (`isPrefixOf` f) [
"fliberate-case-threshold",
"fmax-worker-args",
"fhistory-size",