- 27 Nov, 2015 1 commit
-
-
Herbert Valerio Riedel authored
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
-
- 26 Nov, 2015 3 commits
-
-
Ben Gamari authored
This one slipped through testing.
-
Ben Gamari authored
-
Ben Gamari authored
-
- 25 Nov, 2015 8 commits
-
-
Ben Gamari authored
-
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
-
Test Plan: IIAM Reviewers: austin, bgamari, quchen Reviewed By: bgamari, quchen Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1529 GHC Trac Issues: #10751
-
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
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
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 8e8b9ed9), I instead recover in TcTyClsDecls.checkValidTyCl. There was a lot of associated simplification all round
-
Herbert Valerio Riedel authored
[skip ci]
-
- 24 Nov, 2015 9 commits
-
-
Ben Gamari authored
-
Simon Peyton Jones authored
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
-
Simon Peyton Jones authored
-
Ben Gamari authored
-
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
-
Reviewers: hvr, austin, thomie, bgamari Reviewed By: hvr, austin, thomie, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1495 GHC Trac Issues: #11000
-
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
-
Herbert Valerio Riedel authored
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
-
Herbert Valerio Riedel authored
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
-
- 23 Nov, 2015 16 commits
-
-
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
-
Alan Zimmerman authored
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
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
-
Ben Gamari authored
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
-
Ben Gamari authored
Differential Revision: https://phabricator.haskell.org/D1387
-
Ben Gamari authored
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
-
Ben Gamari authored
Differential Revision: https://phabricator.haskell.org/D1198#40948
-
Ben Gamari authored
Differential Revision: https://phabricator.haskell.org/D1198#40948
-
Ben Gamari authored
-
Ben Gamari authored
-
Ben Gamari authored
RIP-relative addressing isn't available on i386.
-
Ben Gamari authored
The casting here is a bit tricky since Dwarf_Addr is always 64-bits. This means we first need to narrow to uintptr_t before casting to/from a pointer for compatibility on 32-bit architectures.
-
Alan Zimmerman authored
-
Ben Gamari authored
-
Ben Gamari authored
31bcf9b6 changed the behavior of WERROR such that it would only apply to the stage 2 build. The reason for this was to avoid silly redundant imports and such breaking validation on different bootstrap compiler versions. Document the fact that WERROR now only applies to the stage 2 build.
-
- 22 Nov, 2015 3 commits
-
-
This fixes a non-determinism bug where depending on the order of uniques allocated, the type variables would be in a different order when abstracted for the purpose of lifting out an expression. Test Plan: I've added a new testcase that reproduces the problem ./validate Reviewers: simonmar, austin, bgamari, simonpj Reviewed By: simonpj Subscribers: nomeata, thomie Differential Revision: https://phabricator.haskell.org/D1504 GHC Trac Issues: #4012
-
At the moment the API Annotations can only be used on the ParsedSource, as there are changes made to the RenamedSource that prevent it from being used to round trip source code. It is possible to build a map from every Located Name in the RenamedSource from its location to the Name, which can then be used when resolved names are required when changing the ParsedSource. However, there are instances where the identifier is not located, specifically (GHC.VarPat name) (GHC.HsVar name) (GHC.UserTyVar name) (GHC.HsTyVar name) Replace each of the name types above with (Located name) Updates the haddock submodule. Test Plan: ./validate Reviewers: austin, goldfire, bgamari Reviewed By: bgamari Subscribers: goldfire, thomie, mpickering Differential Revision: https://phabricator.haskell.org/D1512 GHC Trac Issues: #11019
-
Test Plan: Test on Arm and PowerPc. Reviewers: bgamari, thomie, austin Differential Revision: https://phabricator.haskell.org/D1510 GHC Trac Issues: #11060
-