[GHC] #11789: Flag suggestion does not always work
GHC
ghc-devs at haskell.org
Thu May 19 09:59:25 UTC 2016
#11789: Flag suggestion does not always work
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Driver | Version: 8.0.1
Resolution: | Keywords: newcomer
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #11429 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by thomie):
* version: 8.1 => 8.0.1
* related: => #11429
Comment:
ghc-8.0.1 never suggests alternative spellings for misspelled //warning//
flags. This should be fixed as well.
With `-Wno-unrecognised-warning-flags` (#11429), unknown warning flags on
the command line are now reported as warnings instead of errors, so they
never reach the `unknownFlagsErr` function in `ghc/Main.hs`.
The issue with `-fppr-cols=1000` vs `-dppr-cols=1000` is that the edit
distance is too large. The flag passed to the fuzzy matcher should
probably break at the `'='` character.
From `fuzzyLookup` in `compiler/utils/Util.hs`:
{{{
-- Work out an approriate match threshold:
-- We report a candidate if its edit distance is <= the threshold,
-- The threshhold is set to about a quarter of the # of characters the
user entered
-- Length Threshold
-- 1 0 -- Don't suggest *any* candidates
-- 2 1 -- for single-char identifiers
-- 3 1
-- 4 1
-- 5 1
-- 6 2
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11789#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list