Commit bbc0ec57 authored by Ben Gamari's avatar Ben Gamari 🐢
Browse files

Fix a few loose ends from D1795

George updated the Diff but I didn't noticed until it was too late.
parent 28f951ed
......@@ -1272,7 +1272,7 @@ warnPmIters dflags (DsMatchContext kind loc)
ctxt = pprMatchContext kind
msg is = fsep [ text "Pattern match checker exceeded"
, parens (ppr is), text "iterations in", ctxt <> dot
, text "(Use fmax-pmcheck-iterations=n"
, text "(Use -fmax-pmcheck-iterations=n"
, text "to set the maximun number of iterations to n)" ]
flag_i = wopt Opt_WarnOverlappingPatterns dflags
......
......@@ -362,9 +362,6 @@ addTmCsDs :: Bag SimpleEq -> DsM a -> DsM a
addTmCsDs tm_cs
= updLclEnv (\env -> env { dsl_tm_cs = unionBags tm_cs (dsl_tm_cs env) })
-- | Check that we have not done more iterations
-- than we are supposed to and inrease the counter
-- | Increase the counter for elapsed pattern match check iterations.
-- If the current counter is already over the limit, fail
incrCheckPmIterDs :: DsM ()
......
......@@ -287,6 +287,14 @@ Compiler
warns in the case of unused term-level patterns. Both flags are implied by
:ghc-flag:`-W`.
- Added the :ghc-flag:`-fmax-pmcheck-iterations` to control how many times
the pattern match checker iterates. Since coverage checking is exponential
in the general case, setting a default number of iterations prevents memory
and performance blowups. By default, the number of iterations is set to
10000000 but it can be set to ``n`` with: ``-fmax-pmcheck-iterations=n``.
If the set number of iterations is exceeded, an informative warning is
issued.
- :ghc-flag:`-this-package-key` has been renamed again (hopefully for the last time!)
to :ghc-flag:`-this-unit-id`. The renaming was motivated by the fact that
the identifier you pass to GHC here doesn't have much to do with packages:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment