diff options
author | Ben Gamari <ben@smart-cactus.org> | 2016-02-04 10:46:28 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-02-04 10:48:16 +0100 |
commit | bbc0ec5733df434878b02f7556a1cc947718a8b1 (patch) | |
tree | 5ee82972ba14942a0dad7302a817ec39f2ff373e | |
parent | 28f951edfe50ea5182065144340061ec326781f5 (diff) | |
download | haskell-bbc0ec5733df434878b02f7556a1cc947718a8b1.tar.gz |
Fix a few loose ends from D1795
George updated the Diff but I didn't noticed until it was too late.
-rw-r--r-- | compiler/deSugar/Check.hs | 2 | ||||
-rw-r--r-- | compiler/deSugar/DsMonad.hs | 3 | ||||
-rw-r--r-- | docs/users_guide/8.0.1-notes.rst | 8 |
3 files changed, 9 insertions, 4 deletions
diff --git a/compiler/deSugar/Check.hs b/compiler/deSugar/Check.hs index a28e39edb1..5570ce963e 100644 --- a/compiler/deSugar/Check.hs +++ b/compiler/deSugar/Check.hs @@ -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 diff --git a/compiler/deSugar/DsMonad.hs b/compiler/deSugar/DsMonad.hs index 3d922f6728..0d19ff9d2c 100644 --- a/compiler/deSugar/DsMonad.hs +++ b/compiler/deSugar/DsMonad.hs @@ -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 () diff --git a/docs/users_guide/8.0.1-notes.rst b/docs/users_guide/8.0.1-notes.rst index 10eab700f8..f537c54642 100644 --- a/docs/users_guide/8.0.1-notes.rst +++ b/docs/users_guide/8.0.1-notes.rst @@ -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: |