summaryrefslogtreecommitdiff
path: root/compiler/main
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't require -hide-all-packages for MIN_VERSION_* macrosThomas Miedema2016-03-301-7/+8
| | | | | | | | | | | | | | | | | Define MIN_VERSION_pkgname and VERSION_pkgname macros for all exposed packages, without requiring -hide-all-packages. See #10970 comment 7-10 for discussion. Reviewers: duncan, ezyang, bgamari, austin Reviewed By: ezyang Subscribers: hvr, rwbarton Differential Revision: https://phabricator.haskell.org/D1869 GHC Trac Issues: #10970
* Rename isNopSig to isTopSigJoachim Breitner2016-03-291-2/+2
| | | | | to be consistent with the other uses of nop vs. top in Demand.hs. Also, stop prettyprinting top strictness signatures in Core dumps.
* Scrap DEC OSF/1 supportHerbert Valerio Riedel2016-03-281-3/+2
| | | | | | | | | | | | | DEC OSF/1 (aka Tru64 UNIX) has been discontinued a few years ago already[1]. This removes the undoubtedly bitrotten support for `OSOsf3 :: OS` from GHC's code-base. Support for `ArchAlpha :: Arch` may be removed at some later point, as there may still be users out there running a more or less recent Linux/alpha distribution on their more-than-a-decade old Alpha hardware... [1]: https://en.wikipedia.org/wiki/Tru64_UNIX
* DynFlags: Initialize unsafeGlobalDynFlags enough to be usefulBen Gamari2016-03-261-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | Previously unsafeGlobalDynFlags would bottom if used prior to initialization. This meant that any attempt to use the pretty-printer early in the initialization process of the compiler would fail. This is quite inconvenient. Here we initialize unsafeGlobalDynFlags with defaultDynFlags, bottoming only if settings is accessed. See #11755. Test Plan: Validate Reviewers: austin Reviewed By: austin Subscribers: thomie, gridaphobe Differential Revision: https://phabricator.haskell.org/D2036 GHC Trac Issues: #11755
* Add option `no-keep-hi-files` and `no-keep-o-files` (fixes #4114)Kai Harries2016-03-242-0/+26
| | | | | | | | | | | | | | | | | Summary: Remove `.hi` and `.o` files if the flags `no-keep-hi-files` and `no-keep-o-files` are given. Test Plan: ./validate Reviewers: austin, thomie, bgamari Reviewed By: thomie, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2021 GHC Trac Issues: #4114
* Default RuntimeRep variables unless -fprint-explicit-runtime-repsBen Gamari2016-03-241-0/+2
| | | | | | | | | | | | | | | | | | | | Summary: Addresses #11549 by defaulting `RuntimeRep` variables to `PtrRepLifted` and adding a new compiler flag `-fprint-explicit-runtime-reps` to disable this behavior. This is just a guess at the right way to go about this. If it's wrong-beyond-any-hope just say so. Test Plan: Working on a testcase Reviewers: goldfire, austin Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D1961 GHC Trac Issues: #11549
* DsExpr: Rip out static/dynamic check in list desugaringBen Gamari2016-03-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | Previously we would try to break explicit lists into a dynamic prefix and static tail and desugar the former into a `build` expression. Unfortunately, this heuristic resulted in surprising behavior (see #11710) and wasn't pulling its weight. Here we drop it (along with the `-fsimple-list-literals` flag), leaving only the list length heuristic to determine whether `build` or cons list desugaring should be used. Test Plan: Validate Reviewers: simonpj, austin Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2023 GHC Trac Issues: #11710
* ErrUtils: Add timings to compiler phasesBen Gamari2016-03-245-51/+119
| | | | | | | | | | | | | | | | | | | | | | | This adds timings and allocation figures to the compiler's output when run with `-v2` in an effort to ease performance analysis. Todo: * Documentation * Where else should we add these? * Perhaps we should remove some of the now-arguably-redundant `showPass` occurrences where they are * Must we force more? * Perhaps we should place this behind a `-ftimings` instead of `-v2` Test Plan: `ghc -v2 Test.hs`, look at the output Reviewers: hvr, goldfire, simonmar, austin Reviewed By: simonmar Subscribers: angerman, michalt, niteria, ezyang, thomie Differential Revision: https://phabricator.haskell.org/D1959
* TypeApplications does not imply AllowAmbiguousTypesRichard Eisenberg2016-03-211-1/+0
|
* DriverPipeline: Fix 'unused arguments' warnings from ClangErik de Castro Lopo2016-03-171-8/+24
| | | | | | | | | | | | | | | | | | | When using Clang as the C compiler, over 100 tests were failing due to Clang reporting that some command line arguments were not being used. These warnings only occur when Clang is compiling assembler files which happens in two places, one of which already conditionally adding `-Qunused-arguments` to the command line when the compiler was Clang. This fixes the other. Test Plan: validate with clang as the C compiler Reviewers: bgamari, hvr, austin, rwbarton Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1998 GHC Trac Issues: #11684
* Add -foptimal-applicative-doSimon Marlow2016-03-111-0/+2
| | | | | | | | | | | | | | | | | | | | Summary: The algorithm for ApplicativeDo rearrangement is based on a heuristic that runs in O(n^2). This patch adds the optimal algorithm, which is O(n^3), selected by a flag (-foptimal-applicative-do). It finds better solutions in a small number of cases (about 2% of the cases where ApplicativeDo makes a difference), but it can be very slow for large do expressions. I'm mainly adding it for experimental reasons. ToDo: user guide docs Test Plan: validate Reviewers: simonpj, bgamari, austin, niteria, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1969
* Handle unset HOME environment variable more gracefullyBen Gamari2016-03-112-7/+8
| | | | | | | | | | | | | | | Test Plan: * Validate * try `env -i ghc` * try `env -i runghc HelloWorld.hs` Reviewers: austin Subscribers: thomie, ezyang Differential Revision: https://phabricator.haskell.org/D1971 GHC Trac Issues: #11678
* GhcMake: Clang/ASSERT fixErik de Castro Lopo2016-03-071-2/+4
| | | | | | | | | | Test Plan: Build with clang Reviewers: thomie, rwbarton, austin, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1977
* GHCi: Fix load/reload space leaks (#4029)Jason Eisenberg2016-03-053-13/+22
| | | | | | | | | | | | | | | | | This patch addresses GHCi load/reload space leaks which could be fixed without adversely affecting performance. Test Plan: make test "TEST=T4029" Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: mpickering, thomie Differential Revision: https://phabricator.haskell.org/D1950 GHC Trac Issues: #4029
* DynFlags: Add -Wredundant-constraints to -WallBen Gamari2016-02-291-1/+2
| | | | | | | | | | | | Test Plan: It works, I promise. Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1956 GHC Trac Issues: #11370
* Default to -fno-show-warning-groups (re #10752)Herbert Valerio Riedel2016-02-271-2/+1
| | | | | | | | | | | | | | | | | | As `-fno-show-warning-groups` shows associated warning groups regardless of whether the respective warning group flag as been passed on the CLI, the warning-group information may be confusing to users. At this point, `-fshow-warning-groups` is useful mostly to GHC developers and possibly GHC users who want to see which warning groups an emitted warning is part of. (Btw, this is particularly interesting in combination with `-Weverything` which enables *every* warning flag known to GHC.) Consequently, starting with this commit, one has to opt-in via `-fshow-warning-groups` for GHC to show warning groups. In order to reduce the testsuite delta in this commit, the `-fshow-warning-groups` flag has been added to TEST_HC_OPTS.
* Print which flag controls emitted SafeHaskell warningsHerbert Valerio Riedel2016-02-271-5/+9
| | | | | | | This is extends bb5afd3c274011c5ea302210b4c290ec1f83209c to cover SafeHaskell warnings. This implements yet another part of #10752
* Unconditionally handle TH known key names.Edward Z. Yang2016-02-261-3/+1
| | | | | | | | | | | | | | | | | | | | | | Previously, we didn't add Template Haskell key names to the list of known uniques when building a stage 1 compiler. But with f16ddcee0c64a92ab911a7841a8cf64e3ac671fd we may refer to TH names even in stage 1, and this was causing uniques to not be setup properly. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate and run stage1 test suite Reviewers: osa1, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1520 GHC Trac Issues: #10382
* Print which warning-flag controls an emitted warningMichael Walker2016-02-258-34/+139
| | | | | | | | | | | | | | | | | Both gcc and clang tell which warning flag a reported warning can be controlled with, this patch makes ghc do the same. More generally, this allows for annotated compiler output, where an optional annotation is displayed in brackets after the severity. This also adds a new flag `-f(no-)show-warning-groups` to control whether to show which warning-group (such as `-Wall` or `-Wcompat`) a warning belongs to. This flag is on by default. This implements #10752 Reviewed By: quchen, bgamari, hvr Differential Revision: https://phabricator.haskell.org/D1943
* Make warning names more consistentManav Rathi2016-02-251-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace "Sigs" with "Signatures" in WarningFlag data constructors. - Replace "PatSyn" with "PatternSynonym" in WarningFlag data constructors. - Deprecate "missing-local-sigs" in favor of "missing-local-signatures". - Deprecate "missing-exported-sigs" in favor of "missing-exported-signatures". - Deprecate "missing-pat-syn-signatures" in favor of "missing-pattern-synonym-signatures". - Replace "ddump-strsigs" with "ddump-str-signatures" These complete the tasks that were explicitly mentioned in #11583 Test Plan: Executed `ghc --show-options` and verified that the flags were changed as expected. Reviewers: svenpanne, austin, bgamari Reviewed By: austin, bgamari Subscribers: mpickering, thomie Differential Revision: https://phabricator.haskell.org/D1939 GHC Trac Issues: #11583
* HscMain: Delete some unused codeÖmer Sinan Ağacan2016-02-251-68/+0
| | | | | | | | | | Reviewers: bgamari, austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1936
* Follow-up to 32a9a7f514bdd33ff72a673adeHerbert Valerio Riedel2016-02-231-2/+2
| | | | ...forgot to stage/add this alpha renaming to the previous commit
* Extend `-Wunrecognised-warning-flag` to cover `-f(no-)warn-*`Herbert Valerio Riedel2016-02-231-5/+7
| | | | | | | | | | | The original implementation for #11429 covers only `-W*` flags. However, old packages will continue to use `-f(no-)warn-*` flags, so it seems desirable to have `-Wunrecognised-warning-flag` apply to those legacy aliases as well. Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1942
* Delete support for deprecated "-- # ..."-style haddock optionsThomas Miedema2016-02-191-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | A long time ago, you could use `"-- # <haddock options>"` to mean that `<haddock options.` should be passed to `haddock`. Since 2007 (03d8585e0940e28e024548654fe3505685aca94f), using `OPTIONS_HADDOCK` is the preferred way to do this. Why is ok to remove support for "-- # .."? * It is not mentioned in the Haddock user's guide, nor are there any tests that use it. * Ever since 2011 (b3e30449aa6d6eaa978eb3c7447ca85985d9d251), it doesn't actually work anymore. The function `getOptionsFromFile` uses `gopt_unset dflags Opt_Haddock` for other reasons, so even when running ghc with `--haddock`, the following rule always fires when the lexer sees "-- # ..", and it gets treated as a normal comment: ``` -- Next, match Haddock comments if no -haddock flag "-- " [$docsym \#] .* / { ifExtension (not . haddockEnabled) } { lineCommentToken } ``` Reviewed by: bgamari Differential Revision: https://phabricator.haskell.org/D1932
* (Another) minor refactoring of substitutionsSimon Peyton Jones2016-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | No change in functionality here, but greater clarity: * In FamInstEnv.FlattenEnv, kill off the fi_in_scope field We are already maintaining an in-scope set in the fe_subst field, so it's silly do to it twice. (This isn't strictly connected to the rest of this patch, but the nomenclature changes below affect the same code, so I put them together.) * TyCoRep.extendTCVSubst used to take a TyVar or a CoVar and work out what to do, but in fact we almost always know which of the two we are doing. So: - define extendTvSubst, extendCvSubst - and use them * Similar renamings in TyCoRep: - extendTCvSubstList --> extendTvSubstList - extendTCvSubstBinder --> extendTvSubstBinder - extendTCvSubstAndInScope --> extendTvSubstAndInScope * Add Type.extendTvSubstWithClone, extendCvSubstWithClone * Similar nomenclature changes in Subst, SimplEnv, Specialise * Kill off TyCoRep.substTelescope (never used)
* DynFlags: Don't panic on incompatible Safe Haskell flagsBen Gamari2016-02-161-1/+1
| | | | | | | | | | | | | | | | | We just return an arbitrary value since we are destined to fail due to the error anyways. Fixes #11580. Test Plan: Needs to be tested Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1925 GHC Trac Issues: #11580
* Rename missing-pat-syn-sigs to missing-pat-syn-signaturesMatthew Pickering2016-02-151-1/+1
|
* Another batch of typo fixes in non-codeGabor Greif2016-02-111-1/+1
|
* compiler: Do not suggest nor complete deprecated flags fix trac issue #11454Nikita Kartashov2016-02-111-545/+772
| | | | | | | | | | | | | | Previously, all flags were present in user suggest and completion. This commit removes the deprecated ones from there. It is done by saving deprecation info at the moment of flag definition. Reviewers: rwbarton, austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D1883
* Comments about ru_autoSimon Peyton Jones2016-02-111-7/+9
| | | | ...following a question from Conal
* Always do eta-reductionSimon Peyton Jones2016-02-111-1/+16
| | | | | | | See Note [Eta-reduction in -O0] in DynFlags. Bottom line: doing eta reduction unconditionally is benign, and removes an ASSERT failure (Trac #11562).
* DynFlags: drop tracking of '-#include' flagsSergei Trofimovich2016-02-091-7/+1
| | | | | | | GHC does not use passed paramaters anywhere for this deprecated option. Signed-off-by: Sergei Trofimovich <siarheit@google.com>
* Print * has Unicode star with -fprint-unicode-syntaxBen Gamari2016-02-091-1/+4
| | | | | | | | Reviewers: austin, thomie Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1893
* Remove unused LiveVars and SRT fields of StgCaseÖmer Sinan Ağacan2016-02-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | We also need to update `stgBindHasCafRefs` assertion with this change, as we no longer have the pre-computed SRT, LiveVars etc. We rename it to `topStgBindHasCafRefs` and implement it like this: A non-updatable top-level binding may refer to a CAF by referring to a top-level definition with CAFs. A top-level definition may have CAFs if it's updatable. At this point (because this is done after TidyPgm) top-level Ids (whether imported or defined in this module) are GlobalIds, so the top-levelness test is easy. (see also comments in the code) Reviewers: bgamari, simonpj, austin Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1889 GHC Trac Issues: #11550
* White space and comments onlySimon Peyton Jones2016-02-081-5/+8
|
* Revert "Remove unused LiveVars and SRT fields of StgCase and StgLetNoEscape"Ömer Sinan Ağacan2016-02-061-2/+2
| | | | This reverts commit 4f9967aa3d1f7cfd539d0c173cafac0fe290e26f.
* Remove unused LiveVars and SRT fields of StgCase and StgLetNoEscapeÖmer Sinan Ağacan2016-02-041-2/+2
| | | | | | | | | | | | | | | | | | Also remove the functions and types that became useless after removing the fields: - SRT functions - LiveInfo type and functions - freeVarsToLiveVars - unariseLives and unariseSRT Reviewers: bgamari, simonpj, austin Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1880
* Overhaul the Overhauled Pattern Match CheckerGeorge Karachalias2016-02-041-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overhaul the Overhauled Pattern Match Checker * Changed the representation of Value Set Abstractions. Instead of using a prefix tree, we now use a list of Value Vector Abstractions. The set of constraints Delta for every Value Vector Abstraction is the oracle state so that we solve everything only once. * Instead of doing everything lazily, we prune at once (and in general everything is much stricter). Hence, an example written with pattern guards is checked in almost the same time as the equivalent with pattern matching. * Do not store the covered and the divergent sets at all. Since what we only need is a yes/no (does this clause cover anything? Does it force any thunk?) We just keep a boolean for each. * Removed flags `-Wtoo-many-guards` and `-ffull-guard-reasoning`. Replaced with `fmax-pmcheck-iterations=n`. Still debatable what should the default `n` be. * When a guard is for sure not going to contribute anything, we treat it as such: The oracle is not called and cases `CGuard`, `UGuard` and `DGuard` from the paper are not happening at all (the generation of a fresh variable, the unfolding of the pattern list etc.). his combined with the above seems to be enough to drop the memory increase for test T783 down to 18.7%. * Do not export function `dsPmWarn` (it is now called directly from within `checkSingle` and `checkMatches`). * Make `PmExprVar` hold a `Name` instead of an `Id`. The term oracle does not handle type information so using `Id` was a waste of time/space. * Added testcases T11195, T11303b (data families) and T11374 The patch addresses at least the following: Trac #11195, #11276, #11303, #11374, #11162 Test Plan: validate Reviewers: goldfire, bgamari, hvr, austin Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D1795
* Avoid mangled/derived names in GHCi autocomplete (fixes #11328)Adam Gundry2016-02-011-1/+4
| | | | | | | | | | | | | | | | | | | This changes `getRdrNamesInScope` to use field labels rather than selector names for fields from modules with `DuplicateRecordFields` enabled. Moreover, it filters out derived names (e.g. type representation bindings) that shouldn't show up in autocomplete. Test Plan: New test ghci/should_run/T11328 Reviewers: kolmodin, austin, bgamari, simonpj Reviewed By: bgamari, simonpj Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D1870 GHC Trac Issues: #11328
* Add some Outputable instancesOleg Grenrus2016-02-011-1/+9
| | | | | | | | | | Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1865
* Implement basic uniform warning set towerHerbert Valerio Riedel2016-02-011-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements/completes the current basic warning sets to provide the following tower of warning sets (i.e. each line subsumes the warnings from the sets listed below): - `-Weverything` - `-Wall` - `-Wextra` (alias of `-W`) - `-Wdefault` So for each of flags there's also a complement `-Wno-...` flag, which subtracts the given set from the current enabled-warnings state. Thus, we can now easily perform simple set subtraction operations, as warning flags are evaluated from left-to-right on the command line. So e.g. - `-Weverything -Wno-all -Wno-compat` enables *all* warnings not enabled by `-Wall` and `-Wcompat`. - `-Wextra -Wno-default` only warnings that `-Wextra` provides beyond the default warnings. Reviewers: quchen, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1850
* Simplify ghc-boot database representation with new type class.Edward Z. Yang2016-02-012-26/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we had an 'OriginalModule' type in ghc-boot which was basically identical to 'Module', and we had to do a bit of gyrating to get it converted into the right form. This commit introduces a new typeclass, 'DbModuleRep' which represents types which we know how to serialize to and from the (now renamed) 'DbModule' type. The upshot is that we can just store 'Module's DIRECTLY in the 'InstalledPackageInfo', no conversion needed. I took the opportunity to clean up ghc-pkg to make its use of the 'BinaryStringRep' classes more type safe. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1811
* Rename "open" subst functionsBartosz Nitka2016-01-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | This is the renaming that @simonpj requested: ``` · zipOpenTCvSubst -> zipTvSubst (It only deals with tyvars) · zipOpenTCvSubstCoVars -> zipCvSubst (it only deals with covars) · zipOpenTCvSubstBinders -> zipTyBinderSubst (it only deals with TyBinders, not covars) ``` plus the `mk` variant. Test Plan: ./validate Reviewers: simonpj, goldfire, austin, bgamari Subscribers: thomie, simonpj Differential Revision: https://phabricator.haskell.org/D1853 GHC Trac Issues: #11371
* Test for undef bugs in the LLVM backend when validatingReid Barton2016-01-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | In an attempt to catch bugs involving using undef values, replace undef literals by values likely to cause crashes or test failures. We do this only when validating since it is a deoptimization. This depends on D1857 to catch such bugs in the RTS (such as #11487). Test Plan: Did a build with ``` BuildFlavour = quick-llvm SRC_HC_OPTS_STAGE1 = -fllvm-fill-undef-with-garbage ``` The build crashed when running ghc-stage2, as expected. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1858
* ghci: fix trac issue #11481Benjamin Bykowski2016-01-271-1/+1
| | | | | | | | | | | | Test Plan: validate Reviewers: thomie, austin, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1833 GHC Trac Issues: #11481
* Enable RemoteGHCi on WindowsTamar Christina2016-01-271-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes the needed changes to make RemoteGHCi work on Windows. The approach passes OS Handles areound instead of the Posix Fd as on Linux. The reason is that I could not find any real documentation about the behaviour of Windows w.r.t inheritance and Posix FDs. The implementation with Fd did not seem to be able to find the Fd in the child process. Instead I'm using the much better documented approach of passing inheriting handles. This requires a small modification to the `process` library. https://github.com/haskell/process/pull/52 Test Plan: ./validate On Windows x86_64 Reviewers: thomie, erikd, bgamari, simonmar, austin, hvr Reviewed By: simonmar Subscribers: #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D1836 GHC Trac Issues: #11100
* Construct in_scope set in mkTopTCvSubstBartosz Nitka2016-01-261-2/+2
| | | | | | | | | | | | | | | | | | | | The pre-condition on `mkTopTCvSubst` turned out to be wrong and not satisfied by any of the callers. I've fixed it, so that it constructs the in_scope set from the range of the substitution. `mkTopTCvSubst` was also unnecessarily general it is never called with `CoVars`, so I changed the type signature and added an assertion. Test Plan: ./validate --slow Reviewers: goldfire, simonpj, bgamari, austin Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1801 GHC Trac Issues: #11371
* Split off -Wunused-type-variables from -Wunused-matchesRyanGlScott2016-01-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, `-Wunused-matches` would fire whenever it detected unused type variables in a type family or data family instance. This can be annoying for users who wish to use type variable names as documentation, as being `-Wall`-compliant would mean that they'd have to prefix many of their type variable names with underscores, making the documentation harder to read. To avoid this, a new warning `-Wunused-type-variables` was created that only encompasses unused variables in family instances. `-Wunused-matches` reverts back to its role of only warning on unused term-level pattern names. Unlike `-Wunused-matches`, `-Wunused-type-variables` is not implied by `-Wall`. Fixes #11451. Test Plan: ./validate Reviewers: goldfire, ekmett, austin, hvr, simonpj, bgamari Reviewed By: simonpj, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1825 GHC Trac Issues: #11451
* Implement -Wunrecognised-warning-flagBen Gamari2016-01-251-4/+18
| | | | | | | | | | | | | | | | | This allows the user to avoid warnings for warning flags that GHC doesn't recognise. See #11429 for details.. Test Plan: Validate with T11429[abc] tests Reviewers: austin, hvr Reviewed By: hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1830 GHC Trac Issues: #11429
* Rename -Wmissing-monadfail-instance to plural-formHerbert Valerio Riedel2016-01-251-3/+3
| | | | | | | | | | | | | | | | | | | This warning flag was recently introduced as part of #10751. However, it was missed during code-review that almost all existing warning flags use a plural-form, so for consistency this commit renames that warning flag to `-Wmissing-monadfail-instances`. Test Plan: local validate (still running) Reviewers: quchen, goldfire, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1842 GHC Trac Issues: #10751