summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into wip/GenericsMetaDatawip/GenericsMetaDataJose Pedro Magalhaes2014-11-0417-97/+412
|\
| * Update doctest example style in `Data.Bool`Michael Orlitzky2014-10-311-20/+20
| | | | | | | | | | | | | | | | | | hvr made some suggestions in D352 and D371, this fixes them in the already-applied patch for Data/Bool.hs as well for consistency. Reviewed By: austin, hvr Differential Revision: https://phabricator.haskell.org/D379
| * Add changelog entry for recent Unicode 7.0 updateHerbert Valerio Riedel2014-10-311-0/+2
| | | | | | | | | | | | | | The internal Unicode definitions were updated via d4fd16801bc59034abdc6214e60fcce2b21af9c8 [skip ci]
| * Clean-up `Data.Fixed`Herbert Valerio Riedel2014-10-311-17/+8
| | | | | | | | | | | | | | | | | | | | | | | | This gets rid of `-fno-warn-unused-binds` by turning the E* types into constructor-less data types (as they're used as phantom-types only) Moreover, this modules uses `AutoDeriveTypeable` so we can drop all those redundant `deriving (Typeable)` lines as well Reviewed By: austin, ekmett Differential Revision: https://phabricator.haskell.org/D385
| * Update Haddock submoduleHerbert Valerio Riedel2014-10-311-0/+0
| | | | | | | | | | This pulls in a change to have the new "Examples" sections being in `base` collapsed by default.
| * Add doctest examples for Data.CharMichael Orlitzky2014-10-311-13/+328
| | | | | | | | | | | | | | | | This adds doctest examples for every function and data type in `Data.Char`. Reviewed By: austin, hvr Differential Revision: https://phabricator.haskell.org/D371
| * Fix comment typosJan Stolarek2014-10-312-3/+3
| |
| * Drop deprecated `OverlappingInstances` from baseHerbert Valerio Riedel2014-10-313-32/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With #9242 the `OverlappingInstances` extension got deprecated, this commit adapts the only two remaining places in `base` where it was still used. Starting with this commit, the `Typeable (s t)` instance (which seemingly was the motivation for using `OverlappingInstances` in the first place when `Typeable` was neither polykinded nor auto-derived-only, see also commit ce3fd0e02826367e6134a3362d8d37aa114236f5 which introduced overlapping instances) does no longer allow overlapping instances, and there doesn't seem to be any good reason to keep allowing overlapping instance now. This also removes redundant `LANGUAGE`/`OPTIONS_GHC` pragmas from `Data.Typeable` and refactors the language pragmas into more uniform single-line pragmas. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D377
| * Updated testsuite/.gitignore to exclude some test artifacts on Windows.Gintautas Miliauskas2014-10-301-1/+3
| | | | | | | | | | | | | | | | | | | | Reviewers: austin Reviewed By: austin Subscribers: thomie, carter, simonmar Differential Revision: https://phabricator.haskell.org/D404
| * Fixed missing trailing newline bug in pretty printerMateusz Lenik2014-10-304-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Pretty printer didn't produce trailing newline in strings in error messages. Reviewers: simonpj, austin Reviewed By: austin Subscribers: thomie, carter, simonmar, mlen Differential Revision: https://phabricator.haskell.org/D405 GHC Trac Issues: #9681
| * Add notes on change to hGetContents semanticsDavid Feuer2014-10-301-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Additionally, move Unicode 7.0 update notice from the compiler section to the base libraries section. Reviewers: austin Reviewed By: austin Subscribers: thomie, carter, simonmar Projects: #ghc Differential Revision: https://phabricator.haskell.org/D401
| * Fix test driver python3 compatibility issuesMateusz Lenik2014-10-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixes python3 compatibility issues by replacing filter with a list comperhension and a potential issue with python2 when override_flags would be an empty list. Reviewers: austin, thomie Reviewed By: austin, thomie Subscribers: thomie, carter, simonmar, mlen Differential Revision: https://phabricator.haskell.org/D399 GHC Trac Issues: #9230
* | Update test outputJose Pedro Magalhaes2014-11-043-235/+187
| |
* | Remove some left-over stuffJose Pedro Magalhaes2014-11-043-36/+18
| |
* | Merge branch 'wip/new-flatten-skolems-Oct14' into wip/GenericsMetaDataJose Pedro Magalhaes2014-11-03546-15879/+19198
|\ \ | | | | | | | | | | | | | | | Conflicts: compiler/typecheck/TcDeriv.lhs compiler/typecheck/TcGenGenerics.lhs
| * | Simon's major commit to re-engineer the constraint solverwip/new-flatten-skolems-Oct14Simon Peyton Jones2014-11-0313-2218/+2842
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driving change is this: * The canonical CFunEqCan constraints now have the form [G] F xis ~ fsk [W] F xis ~ fmv where fsk is a flatten-skolem, and fmv is a flatten-meta-variable Think of them as the name of the type-function application See Note [The flattening story] in TcFlatten. A flatten-meta-variable is distinguishable by its MetaInfo of FlatMetaTv This in turn led to an enormous cascade of other changes, which simplify and modularise the constraint solver. In particular: * Basic data types * I got rid of inert_solved_funeqs altogether. It serves no useful role that inert_flat_cache does not solve. * I added wl_implics to the WorkList, as a convenient place to accumulate newly-emitted implications; see Note [Residual implications] in TcSMonad. * I eliminated tcs_ty_binds altogether. These were the bindings for unification variables that we have now solved by unification. We kept them in a finite map and did the side-effecting unification later. But in cannonicalisation we had to look up in the side-effected mutable tyvars anyway, so nothing was being gained. Our original idea was that the solver would be pure, and would be a no-op if you discarded its results, but this was already not-true for implications since we update their evidence bindings in an imperative way. So rather than the uneasy compromise, it's now clearly imperative! * I split out the flatten/unflatten code into a new module, TcFlatten * I simplified and articulated explicitly the (rather hazy) invariants for the inert substitution inert_eqs. See Note [eqCanRewrite] and See Note [Applying the inert substitution] in TcFlatten * Unflattening is now done (by TcFlatten.unflatten) after solveFlats, before solving nested implications. This turned out to simplify a lot of code. Previously, unflattening was done as part of zonking, at the very very end. * Eager unflattening allowed me to remove the unpleasant ic_fsks field of an Implication (hurrah) * Eager unflattening made the TcSimplify.floatEqualities function much simpler (just float equalities looking like a ~ ty, where a is an untouchable meta-tyvar). * Likewise the idea of "pushing wanteds in as givens" could be completely eliminated. * I radically simplified the code that determines when there are 'given' equalities, and hence whether we can float 'wanted' equalies out. See TcSMonad.getNoGivenEqs, and Note [When does an implication have given equalities?]. This allowed me to get rid of the unpleasant inert_no_eqs flag in InertCans. * As part of this given-equality stuff, I fixed Trac #9211. See Note [Let-bound skolems] in TcSMonad * Orientation of tyvar/tyvar equalities (a ~ b) was partly done during canonicalisation, but then repeated in the spontaneous-solve stage (trySpontaneousSolveTwoWay). Now it is done exclusively during canonicalisation, which keeps all the code in one place. See Note [Canonical orientation for tyvar/tyvar equality constraints] in TcCanonical
| * | Compiler performance is much worse in for loopy givensSimon Peyton Jones2014-11-032-6/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a deliberate choice, to simplify code, invariants, and I think performance in typical cases. The "loopy givens" case is situations like [G] a ~ TF (a, Int) where TF is a type function with TF (a,b) = (TF a, TF b). See Note [An alternative story for the inert substitution] in TcFlatten.
| * | Make this test a bit simplerSimon Peyton Jones2014-10-312-11/+2
| | | | | | | | | | | | | | | | | | There were two unrelated functions, and the `-ddump-rule-firings` output was coming in a non-deterministic order as a result. So now there is just one function.
| * | Add flattening-notesSimon Peyton Jones2014-10-311-0/+49
| | |
| * | Testsuite error message changesSimon Peyton Jones2014-10-31120-1063/+1331
| | |
| * | Comments onlySimon Peyton Jones2014-10-311-1/+2
| | |
| * | Fix the superclass-cycle detection code (Trac #9739)Simon Peyton Jones2014-10-314-27/+34
| | | | | | | | | | | | | | | | | | | | | We were falling into an infinite loop when doing the ambiguity check on a class method, even though we had previously detected a superclass cycle. There was code to deal with this, but it wasn't right.
| * | Test Trac #9739Simon Peyton Jones2014-10-313-0/+17
| | |
| * | Add comments explaining ProbOneShotSimon Peyton Jones2014-10-314-44/+79
| | |
| * | Test Trac #9747Simon Peyton Jones2014-10-312-0/+40
| | |
| * | Improve error message for a handwritten Typeable instanceSimon Peyton Jones2014-10-315-18/+35
| | |
| * | Test Trac #9708Simon Peyton Jones2014-10-313-0/+28
| | |
| * | Test Trac #9211Simon Peyton Jones2014-10-312-0/+11
| | |
| * | Define ctEvLoc and ctEvCoercion, and use themSimon Peyton Jones2014-10-312-5/+15
| | |
| * | Minor refactoring (no change in functionality)Simon Peyton Jones2014-10-311-3/+3
| | |
| * | Don't filter out allegedly-irrelevant bindings with -dppr-debugSimon Peyton Jones2014-10-311-1/+3
| | |
| * | Only report "could not deduce s~t from ..." for givens that include equalitiesSimon Peyton Jones2014-10-311-6/+8
| | | | | | | | | | | | | | | This just simplifies the error message in cases where there are no useful equalities in the context
| * | When reporting the context of given constraints, stop when you find oneSimon Peyton Jones2014-10-311-6/+17
| | | | | | | | | | | | | | | | | | that binds a variable mentioned in the wanted There is really no point in reporting ones further out; they can't be useful
| * | Typechecker debug tracing onlySimon Peyton Jones2014-10-314-32/+39
| | |
| * | Normalise the type of an inferred let-bindingSimon Peyton Jones2014-10-312-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the new constraint solver, we don't guarantee to fully-normalise all constraints (if doing so is not necessary to solve them). So we may end up with an inferred type like f :: [F Int] -> Bool which could be simplifed to f :: [Char] -> Bool if there is a suitable family instance declaration. This patch does this normalisation, in TcBinds.mkExport
| * | Get the Untouchables level right in simplifyInferSimon Peyton Jones2014-10-315-126/+179
| | | | | | | | | | | | | | | | | | | | | | | | Previously we could get constraints in which the untouchables-level did not strictly increase, which is one of the main invariants! This patch also simplifies and modularises the tricky case of generalising an inferred let-binding
| * | Refactor the treatment of lexically-scoped type variables for instance ↵Simon Peyton Jones2014-10-314-21/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | declarations Previously the univerally-quantified variables of the DFun were also (bizarrely) used as the lexically-scoped variables of the instance declaration. So, for example, the DFun's type could not be alpha-renamed. This was an odd restriction, which has bitten me several times. This patch does the Right Thing, by adding an ib_tyvars field to the InstBindings record, which captures the lexically scoped variables. Easy, robust, nice. (I think this record probably didn't exist originally, hence the hack.)
| * | Refactor skolemising, and newClsInstSimon Peyton Jones2014-10-315-103/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | This makes newClsInst (was mkInstance) look more like newFamInst, and simplifies the plumbing of the overlap flag, and ensures that freshening (required by the InstEnv stuff) happens in one place. On the way I also tided up the rather ragged family of tcInstSkolTyVars and friends. The result at least has more uniform naming.
| * | Rename setRole_maybe to downgradeRole_maybeSimon Peyton Jones2014-10-311-18/+18
| | | | | | | | | | | | This change is just for naming uniformity with the existing downgradeRole
| * | Simplify the API for tcInstTyVars, and make it more consistent with other ↵Simon Peyton Jones2014-10-315-31/+33
| | | | | | | | | | | | similar functions
| * | Fix reduceTyFamApp_maybeSimon Peyton Jones2014-10-311-12/+34
| | | | | | | | | | | | | | | This function previously would expand *data* families even when it was asked for a *Nominal* coercion. This patch fixes it, and adds comments.
| * | White space onlySimon Peyton Jones2014-10-315-52/+60
| | |
| * | Add the unfolding and inline-pragma for DFuns in DsBinds, not TcInstDclsSimon Peyton Jones2014-10-312-23/+28
| | | | | | | | | | | | | | | This is a straight refactoring that puts the generation of unfolding info in one place, which is a lot tidier
| * | Simplify the generation of superclass constraints in tcInstDecl2Simon Peyton Jones2014-10-311-9/+10
| | | | | | | | | | | | | | | The simplified function is tcSuperClasses; no need for an implication constraint here
| * | Some refactoring around endPass and debug dumpingSimon Peyton Jones2014-10-3113-117/+157
| | | | | | | | | | | | | | | I forget all the details, but I spent some time trying to understand the current setup, and tried to simplify it a bit
| * | Improve pretty-printing of type variablesSimon Peyton Jones2014-10-311-10/+10
| | | | | | | | | | | | | | | In particular, print a bit of debug info in debug-style and dump-style Otherwise distinct type variables look the same
| * | Tidy up pretty-printing of SrcLoc and SrcSpanSimon Peyton Jones2014-10-311-46/+55
| |/
| * Comments onlyJan Stolarek2014-10-301-1/+1
| |
| * Added mingw32-specific expected stdout files for tests/driver/sigof{01,02,03}Gintautas Miliauskas2014-10-293-0/+24
| | | | | | | | | | | | | | | | | | | | Reviewers: austin Reviewed By: austin Subscribers: thomie, carter, simonmar Differential Revision: https://phabricator.haskell.org/D398
| * Add __GLASGOW_HASKELL_TH__=YES/NO to CPP definitionsJoachim Breitner2014-10-292-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Test Plan: None really. Reviewers: austin Reviewed By: austin Subscribers: thomie, carter, simonmar Differential Revision: https://phabricator.haskell.org/D386 GHC Trac Issues: #9734