summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/master' into wip/spj-wildcard-refactorwip/spj-wildcard-refactorSimon Peyton Jones2015-12-018-47/+109
|\
| * Fix grammar and typo in TcTyDeclsBartosz Nitka2015-12-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: It's just a docufix. Test Plan: just a docufix Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1550
| * Build system: Add stage specific SRC_HC_(WARNING_)OPTSThomas Miedema2015-12-015-37/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add stage specific versions of SRC_HC_OPTS. These are currently only used for -Werror. The previous combination of GhcStage2HcOpts and GhcLibHcOpts didn't apply to utils/*. * Add stage specific versions of SRC_HC_WARNING_OPTS. These will later be used for new warning supression flags that should not be passed to the bootstrap compiler. * Move -Wall (and -Werror) related code back to mk/warnings.mk, where it was before 987d54274. Now all warning related code is nicely together. Include mk/warnings.mk after mk/custom-settings.mk to make this work. Reviewed By: bgamari, hvr Differential Revision: https://phabricator.haskell.org/D1536
| * MkId: Typos in commentsÖmer Sinan Ağacan2015-11-301-6/+6
| |
* | WibblesSimon Peyton Jones2015-12-015-51/+37
| |
* | Merge remote-tracking branch 'origin/master' into wip/spj-wildcard-refactorSimon Peyton Jones2015-11-3052-229/+726
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: compiler/hsSyn/HsTypes.hs compiler/rename/RnSplice.hs testsuite/tests/ghci/scripts/T10248.stderr testsuite/tests/typecheck/should_fail/CustomTypeErrors02.stderr testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr
| * Implement warnings for Semigroups as parent of MonoidDavid Luposchainsky2015-11-2922-31/+402
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is similar to the AMP patch (#8004), which offered two functions: 1. Warn when an instance of a class has been given, but the type does not have a certain superclass instance 2. Warn when top-level definitions conflict with future Prelude names These warnings are issued as part of the new `-Wcompat` warning group. Reviewers: hvr, ekmett, austin, bgamari Reviewed By: hvr, ekmett, bgamari Subscribers: ekmett, thomie Differential Revision: https://phabricator.haskell.org/D1539 GHC Trac Issues: #11139
| * Some improvements on CoreToDos passed to pluginsÖmer Sinan Ağacan2015-11-292-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does two improvements: - We now show ToDos in `CoreDoPasses`. This is pretty important, otherwise `CoreDoPasses` makes debugging impossible in some cases. - Before running ToDos we run a cleanup pass on ToDos to remove `CoreDoNothing`s and flatten `CoreDoPasses`. This removes a lot of noise from `[CoreToDo]` argument passed to plugins. Reviewers: simonpj, bgamari, austin Reviewed By: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1548
| * ghci: Refactor handling of :showBen Gamari2015-11-291-21/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In so doing ensure that the help text can't fall out of sync with the implementation. Test Plan: Validate and play in ghci Reviewers: austin, thomie Reviewed By: austin, thomie Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1538 GHC Trac Issues: #11111
| * Remove redundant `#if`sHerbert Valerio Riedel2015-11-292-12/+0
| | | | | | | | | | | | | | | | | | `#if __GLASGOW_HASKELL__ > xxx` macros make little sense inside `base` currently. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D1541
| * Update deepseq submoduleHerbert Valerio Riedel2015-11-291-0/+0
| | | | | | | | | | | | This pulls in new NFData instances for NonEmpty and Semigroup newtype wrappers Differential Revision: https://phabricator.haskell.org/D1546
| * Update containers submoduleHerbert Valerio Riedel2015-11-294-4/+4
| | | | | | | | Differential Revision: https://phabricator.haskell.org/D1545
| * GHCi should not defer typed holesThomas Miedema2015-11-292-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the function `tcUserStmt` in compiler/typecheck/TcRnDriver.hs, before going over the different ways ('plans') to lift an expression typed at the prompt into the GHCi monad, `Opt_DeferTypeErrors` is disabled. Here is the accompanying comment: ``` -- Ensure that type errors don't get deferred when type checking the -- naked expression. Deferring type errors here is unhelpful because the -- expression gets evaluated right away anyway. It also would potentially -- emit redundant type-error warnings, one from each plan. ; plan <- unsetGOptM Opt_DeferTypeErrors $ ``` Since `Opt_DeferTypeErrors` implies `Opt_DeferTypedHoles`, `Opt_DeferTypedHoles` should be disabled here as well. This improves the error message for T10248 (it doesn't mention ghciStepIO anymore). This is a partial fix for #10249, and a complete fix for #11130. Depends on D1526 Reviewers: simonpj, austin, bgamari Reviewed By: simonpj Subscribers: simonpj Differential Revision: https://phabricator.haskell.org/D1527 GHC Trac Issues: #10249, #11130
| * Remove deprecated quasiquoter syntax.Matthew Pickering2015-11-294-28/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In spirit, this reverts 9ba922ee06b048774d7a82964867ff768a78126e The syntax has been deprecated with a warning since 2010. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1530
| * ghc-pkg: print version when verboseAdam Sandberg Eriksson2015-11-291-24/+26
| | | | | | | | | | | | | | | | | | | | Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1534
| * ghci: Add support for prompt functionsBen Gamari2015-11-292-50/+73
| | | | | | | | | | This is an updated version of @jlengyel's original patch adding support for prompt functions.
| * Implement new -XTemplateHaskellQuotes pragmaHerbert Valerio Riedel2015-11-2910-34/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since f16ddcee0c64a92ab911a7841a8cf64e3ac671fd / D876, `ghc-stage1` supports a subset of `-XTemplateHaskell`, but since we need Cabal to be able detect (so `.cabal` files can be specified accordingly, see also GHC #11102 which omits `TemplateHaskell` from `--supported-extensions`) whether GHC provides full or only partial `-XTemplateHaskell` support, the proper way to accomplish this is to split off the quotation/non-splicing `TemplateHaskell` feature-subset into a new language pragma `TemplateHaskellQuotes`. Moreover, `-XTemplateHaskellQuotes` is considered safe under SafeHaskell This addresses #11121 Reviewers: goldfire, ezyang, dterei, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1511 GHC Trac Issues: #11121
| * Update haskeline & terminfo submodulesHerbert Valerio Riedel2015-11-282-0/+0
| | | | | | | | Differential Revision: https://phabricator.haskell.org/D1542
| * Check arity on default decl for assoc typesSimon Peyton Jones2015-11-274-8/+30
| | | | | | | | | | | | Fixes Trac #11136. We should check arity before doing tcTyClTyVars, because the latter crahes if the arity isn't right.
| * Update transformers submoduleHerbert Valerio Riedel2015-11-271-0/+0
| | | | | | | | | | | | | | | | | | | | | | Most notably this pulls in `MonadFail` instances (see also #10751) - add MonadFail instance for ContT - re-order methods for consistency - Add `MonadFail` instances - Canonicalise Monad instances - instance Bifunctor Constant
| * Libdw: Handle failure to grab session for location lookupBen Gamari2015-11-262-7/+12
| | | | | | | | This one slipped through testing.
| * LibdwPool: Use poolTryTakeBen Gamari2015-11-261-1/+18
| |
| * rts/Pool: Add poolTryTakeBen Gamari2015-11-262-12/+39
| |
* | Merge remote-tracking branch 'origin/master' into wip/spj-wildcard-refactorSimon Peyton Jones2015-11-2633-590/+791
|\ \ | |/ | | | | | | | | | | | | | | | | | | Conflicts: compiler/typecheck/TcClassDcl.hs compiler/typecheck/TcTyClsDecls.hs compiler/typecheck/TcTyDecls.hs compiler/typecheck/TcTypeable.hs compiler/typecheck/TcValidity.hs testsuite/tests/typecheck/should_fail/T5300.stderr testsuite/tests/typecheck/should_fail/T8030.stderr
| * Note #11108 in the bugs section of users guideBen Gamari2015-11-261-0/+5
| |
| * User documentation for DuplicateRecordFieldsAdam Gundry2015-11-261-255/+415
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a first draft of the user manual documentation for DuplicateRecordFields. Feedback welcome. I've intentionally made this a minimal change, but I wonder if it might make sense to pull out all the subsections on record system extensions ("Traditional record syntax", and "Record field disambiguation" through to "Record wildcards") into a new section? That is, is it worth breaking down the rather monolithic "Syntactic extensions" section? Test Plan: n/a Reviewers: simonpj, bgamari, austin Reviewed By: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1522
| * User's Guide: Add links to MFP wiki pageHerbert Valerio Riedel2015-11-263-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Test Plan: IIAM Reviewers: austin, bgamari, quchen Reviewed By: bgamari, quchen Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1529 GHC Trac Issues: #10751
| * Note STM's vulnerability to non-allocating loopsBen Gamari2015-11-261-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Test Plan: Read it Reviewers: austin, fryguybob Reviewed By: austin Subscribers: thomie, fryguybob Differential Revision: https://phabricator.haskell.org/D1523 GHC Trac Issues: #10639, #367
| * Add a simplifier trace for eta-expansionSimon Peyton Jones2015-11-251-1/+4
| |
| * Comments onlySimon Peyton Jones2015-11-251-1/+0
| |
| * Refactor default methods (Trac #11105)Simon Peyton Jones2015-11-2525-303/+386
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does some signficant refactoring to the treatment of default methods in class declarations, and more generally to the type checking of type/class decls. Highlights: * When the class has a generic-default method, such as class C a where op :: a -> a -> Bool default op :: Ord a => a -> a -> a the ClassOpItem records the type of the generic-default, in this case the type (Ord a => a -> a -> a) * I killed off Class.DefMeth in favour of the very-similar BasicTypes.DefMethSpec. However it turned out to be better to use a Maybe, thus Maybe (DefMethSpec Type) with Nothing meaning "no default method". * In TcTyClsDecls.tcTyClGroup, we used to accumulate a [TyThing], but I found a way to make it much simpler, accumulating only a [TyCon]. Much less wrapping and unwrapping. * On the way I also fixed Trac #10896 in a better way. Instead of killing off all ambiguity checks whenever there are any type errors (the fix in commit 8e8b9ed), I instead recover in TcTyClsDecls.checkValidTyCl. There was a lot of associated simplification all round
| * update link to MonadFail proposalHerbert Valerio Riedel2015-11-251-1/+2
| | | | | | | | [skip ci]
| * DynFlags: Drop stale commentBen Gamari2015-11-241-2/+1
| |
* | Merge remote-tracking branch 'origin/master' into wip/spj-wildcard-refactorSimon Peyton Jones2015-11-24225-2657/+3795
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: compiler/hsSyn/HsExpr.hs compiler/rename/RnSource.hs testsuite/tests/arrows/should_fail/T5380.stderr testsuite/tests/gadt/T3169.stderr testsuite/tests/gadt/rw.stderr testsuite/tests/ghci/scripts/Defer02.stderr testsuite/tests/ghci/scripts/ghci050.stderr testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr testsuite/tests/indexed-types/should_compile/T3208b.stderr testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr testsuite/tests/indexed-types/should_fail/Overlap6.stderr testsuite/tests/indexed-types/should_fail/SimpleFail5a.stderr testsuite/tests/indexed-types/should_fail/T3330a.stderr testsuite/tests/indexed-types/should_fail/T3440.stderr testsuite/tests/indexed-types/should_fail/T4093a.stderr testsuite/tests/indexed-types/should_fail/T4093b.stderr testsuite/tests/indexed-types/should_fail/T4174.stderr testsuite/tests/indexed-types/should_fail/T4272.stderr testsuite/tests/indexed-types/should_fail/T7194.stderr testsuite/tests/indexed-types/should_fail/T9662.stderr testsuite/tests/monadfail/MonadFailErrors.stderr testsuite/tests/parser/should_fail/T7848.stderr testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr testsuite/tests/partial-sigs/should_compile/T10438.stderr testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr testsuite/tests/partial-sigs/should_fail/T10045.stderr testsuite/tests/partial-sigs/should_fail/T10615.stderr testsuite/tests/partial-sigs/should_fail/Trac10045.stderr testsuite/tests/polykinds/T7230.stderr testsuite/tests/polykinds/T7438.stderr testsuite/tests/th/T10267.stderr testsuite/tests/typecheck/should_compile/FD1.stderr testsuite/tests/typecheck/should_compile/FD2.stderr testsuite/tests/typecheck/should_compile/FD3.stderr testsuite/tests/typecheck/should_compile/tc141.stderr testsuite/tests/typecheck/should_fail/CustomTypeErrors02.stderr testsuite/tests/typecheck/should_fail/T10285.stderr testsuite/tests/typecheck/should_fail/T10534.stderr testsuite/tests/typecheck/should_fail/T1899.stderr testsuite/tests/typecheck/should_fail/T3540.stderr testsuite/tests/typecheck/should_fail/T7453.stderr testsuite/tests/typecheck/should_fail/T7696.stderr testsuite/tests/typecheck/should_fail/T7748a.stderr testsuite/tests/typecheck/should_fail/T7869.stderr testsuite/tests/typecheck/should_fail/T8450.stderr testsuite/tests/typecheck/should_fail/tcfail032.stderr testsuite/tests/typecheck/should_fail/tcfail057.stderr testsuite/tests/typecheck/should_fail/tcfail065.stderr testsuite/tests/typecheck/should_fail/tcfail068.stderr testsuite/tests/typecheck/should_fail/tcfail076.stderr testsuite/tests/typecheck/should_fail/tcfail131.stderr testsuite/tests/typecheck/should_fail/tcfail175.stderr testsuite/tests/typecheck/should_fail/tcfail179.stderr testsuite/tests/typecheck/should_fail/tcfail201.stderr
| * Simplify the MonadFail codeSimon Peyton Jones2015-11-242-132/+94
| | | | | | | | | | | | | | | | | | | | Simplify and tidy up the MonadFail code. See TcMatches.tcMonadFailOp Less, code; and more robust. This incidentally fixes a bug; see the change to MonadFailErrors.stderr
| * Comments onlySimon Peyton Jones2015-11-241-13/+31
| |
| * DynFlags: Update comments to reflect new users guideBen Gamari2015-11-241-6/+7
| |
| * Rewrite checkUniques and incorporate into validateBen Gamari2015-11-244-124/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should catch duplicate uniques in the future before Bad Things happen. Test Plan: Introduce a duplicate unique and validate Reviewers: austin, hvr, thomie Reviewed By: hvr, thomie Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1521
| * Add -Wcompat warning flag groupDavid Luposchainsky2015-11-2410-11/+133
| | | | | | | | | | | | | | | | | | | | | | | | Reviewers: hvr, austin, thomie, bgamari Reviewed By: hvr, austin, thomie, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1495 GHC Trac Issues: #11000
| * Rearrange error msgs and add section markers (Trac #11014).Evan Laforge2015-11-24148-590/+690
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This puts the "Relevant bindings" section at the end. It uses a TcErrors.Report Monoid to divide messages by importance and then mappends them together. This is not the most efficient way since there are various intermediate Reports and list appends, but it probably doesn't matter since error messages shouldn't get that large, and are usually prepended. In practice, everything is `important` except `relevantBindings`, which is `supplementary`. ErrMsg's errMsgShortDoc and errMsgExtraInfo were extracted into ErrDoc, which has important, context, and suppelementary fields. Each of those three sections is marked with a bullet character, '•' on unicode terminals and '*' on ascii terminals. Since this breaks tons of tests, I also modified testlib.normalise_errmsg to strip out '•'s. --- Additional notes: To avoid prepending * to an empty doc, I needed to filter empty docs. This seemed less error-prone than trying to modify everyone who produces SDoc to instead produce Maybe SDoc. So I added `Outputable.isEmpty`. Unfortunately it needs a DynFlags, which is kind of bogus, but otherwise I think I'd need another Empty case for SDoc, and then it couldn't be a newtype any more. ErrMsg's errMsgShortString is only used by the Show instance, which is in turn only used by Show HscTypes.SourceError, which is in turn only needed for the Exception instance. So it's probably possible to get rid of errMsgShortString, but that would a be an unrelated cleanup. Fixes #11014. Test Plan: see above Reviewers: austin, simonpj, thomie, bgamari Reviewed By: thomie, bgamari Subscribers: simonpj, nomeata, thomie Differential Revision: https://phabricator.haskell.org/D1427 GHC Trac Issues: #11014
| * Implement new `-fwarn-noncanonical-monad-instances`Herbert Valerio Riedel2015-11-248-1/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Warn about incoherent/non-canonical 'Applicative'/'Monad' instance declarations. Specifically the following invariants are checked: In 'Monad' instances declarations warn if the any of the following conditions does not hold: * If `return` is overridden it must be canonical (i.e. `return = pure`). * If `(>>)` is overridden it must be canonical (i.e. `(>>) = (*>)`). In 'Applicative' instance declarations: * Warn if 'pure' is defined backwards (i.e. `pure = return`). * Warn if '(*>)' is defined backwards (i.e. `(*>) = (>>)`). NB, this warning flag is not enabled via `-Wall` nor `-Wcompat`. This addresses #11128 Reviewers: quchen, austin, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1516
| * Add `PrelNames.thenAName` for `Applicative(*>)`Herbert Valerio Riedel2015-11-242-12/+18
| | | | | | | | | | | | | | | | | | | | | | This is needed to allow subsequent patches to refer to `*>`. While at it, this commit also groups together the `Applicative` definitions to reduce confusion. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D1513
| * rts: Always export Libdw* symbolsBen Gamari2015-11-231-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we'll get link time failures as `base` always builds `GHC.ExecutionStack`. Test Plan: Validate Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1519
| * Add the rest of the notes for Located RdrNameAlan Zimmerman2015-11-234-2/+18
| |
| * Add tests/monadfail/MakefileSimon Peyton Jones2015-11-231-0/+3
| |
| * Improve constraint-used-as-type error msgSimon Peyton Jones2015-11-238-43/+58
| | | | | | | | | | | | This responds to Trac #11112 by improving the error message when the kind checker discovers something of kind Constraint used when a type is expected
| * Output source notes in extended DWARF DIEsBen Gamari2015-11-234-29/+125
| | | | | | | | | | | | | | | | In order to accomplish this we need to ensure that emit DIEs for all DebugBlocks, even those that have been optimized out, lest we end up with undefined symbols of parents at link time. Differential Revision: https://phabricator.haskell.org/D1279
| * Dwarf: Ensure tick parentage is preservedBen Gamari2015-11-232-8/+45
| | | | | | | | Differential Revision: https://phabricator.haskell.org/D1387
| * Support multiple debug output levelsBen Gamari2015-11-2311-23/+33
| | | | | | | | | | | | | | | | | | We now only strip block information from DebugBlocks when compiling with `-g1`, intended to be used when only minimal debug information is desired. `-g2` is assumed when `-g` is passed without any integer argument. Differential Revision: https://phabricator.haskell.org/D1281
| * base: Add Haskell interface to ExecutionStackBen Gamari2015-11-234-0/+287
| | | | | | | | Differential Revision: https://phabricator.haskell.org/D1198#40948