- 06 Jan, 2015 10 commits
-
-
Simon Peyton Jones authored
This patch affects libraries, and requires a submodule update. Some other libraries, maintained by others, have redundant constraints, namely: containers haskeline transformers binary I have suppressed the redundant-constraint warnings by settings in validate-settings.mk (in this commit)
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
The idea was promted by Trac #9939, but it was Christmas, so I did some recreational programming that went much further. The idea is to warn when a constraint in a user-supplied context is redundant. Everything is described in detail in Note [Tracking redundant constraints] in TcSimplify. Main changes: * The new ic_status field in an implication, of type ImplicStatus. It replaces ic_insol, and includes information about redundant constraints. * New function TcSimplify.setImplicationStatus sets the ic_status. * TcSigInfo has sig_report_redundant field to say whenther a redundant constraint should be reported; and similarly the FunSigCtxt constructor of UserTypeCtxt * EvBinds has a field eb_is_given, to record whether it is a given or wanted binding. Some consequential chagnes to creating an evidence binding (so that we record whether it is given or wanted). * AbsBinds field abs_ev_binds is now a *list* of TcEvBiinds; see Note [Typechecking plan for instance declarations] in TcInstDcls * Some significant changes to the type checking of instance declarations; Note [Typechecking plan for instance declarations] in TcInstDcls. * I found that TcErrors.relevantBindings was failing to zonk the origin of the constraint it was looking at, and hence failing to find some relevant bindings. Easy to fix, and orthogonal to everything else, but hard to disentangle. Some minor refactorig: * TcMType.newSimpleWanteds moves to Inst, renamed as newWanteds * TcClassDcl and TcInstDcls now have their own code for typechecking a method body, rather than sharing a single function. The shared function (ws TcClassDcl.tcInstanceMethodBody) didn't have much code and the differences were growing confusing. * Add new function TcRnMonad.pushLevelAndCaptureConstraints, and use it * Add new function Bag.catBagMaybes, and use it in TcSimplify
-
Simon Peyton Jones authored
The main change is in TypeRep.pprTheta, so we print Eq a for a singleton, but (Eq a, Show a) for multiple constraints. There are lots of trivial knock-on changes to error messages
-
Simon Peyton Jones authored
When doing top-level defaulting, in TcSimplify.applyDefaultingRules, we were temporarily making a unification variable equal to the default type (Integer, say, or Float), as a 'given', and trying to solve. But this relied on the unification variable being untouchable, which seems complicated. It's much simpler just to generate a new set of constraints to solve, using newWantedEvVarNC in disambigGroup. (I tripped over an ASSERT failure, and this solved it in a robust way.)
-
Simon Peyton Jones authored
This fixes an ASSERT failure in TcBinds. The problem was that we were generating NoGen plan for a function with a partial type signature, and that led to confusion and lost invariants. See Note [Partial type signatures and generalisation] in TcBinds
-
Simon Peyton Jones authored
I think the new implementation is a bit more efficient, because it uses a work-list, rather than iterating over the entire set every time
-
Simon Peyton Jones authored
In particular In the type signature for: f :: Int -> Int I added the colon Also reword the "maybe you haven't applied a function to enough arguments?" suggestion to make grammatical sense. These tiny changes affect a lot of error messages.
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
Previously it was a SrcSpan, which can be an UnhelpulSrcSpan, but actually for TcLclEnv and CtLoc we always know it is a real source location, and it's good to make the types reflect that fact. There is a continuing slight awkwardness (not new with this patch) about what "file name" to use for GHCi code. Current we say "<interactive>" which seems just about OK.
-
- 05 Jan, 2015 1 commit
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- 03 Jan, 2015 4 commits
-
-
Herbert Valerio Riedel authored
-
Edward Z. Yang authored
Summary: Where we track timestamps of object files, also track timestamps for interface files. When -fno-code -fwrite-interface is enabled, use the interface file timestamp as an extra check to see if the files are up-to-date. We had to apply this logic to one-shot and make modes. This fix would be good to merge into 7.10; it makes using -fno-code -fwrite-interface for flywheel type checking usable. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate and new test cases Reviewers: austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D596 GHC Trac Issues: #9243
-
Edward Z. Yang authored
Summary: The isNothing maybe_old_linkable check predates 48bc81ad, which fixed #481 by requiring recompilation information to be passed in as an argument to compileOne. As a result, the check here is redundant: the client has already taken a look at the object file to see if it is available or not. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonmar, austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D594
-
Joachim Breitner authored
either one of the two recent commits (d8d00318, fd97d2a7) fixed it, or there is some nondeterminism here. See #9938.
-
- 31 Dec, 2014 2 commits
-
-
Simon Peyton Jones authored
See Note [Replacement vs keeping]. There's a bit further to go with this change (to report unused givens). But it's already an improvement; see the latent bug described in the Note.
-
Simon Peyton Jones authored
I always found calls to TcCanonical.xCtEvidence hard to grok; and I found that we only had two left. This patch eliminates them, along with xCtEvidence, its accompanying comments, and the auxiliary XEvTerm type. The two remaining calls were these: * One was in newSCWorkFromFlavored, where we'd already done case-splitting for given/wanted/derived. So inlining the xCtEvidence made the code simpler, clearer, and faster. * The other was in canTuple; here all of xCtEvidence's functionality was needed, but inlining again made a net gain in code size and clarity.
-
- 30 Dec, 2014 5 commits
-
-
Simon Peyton Jones authored
This tidies up all the comments about recursive superclasses and when to add superclasses. Lots of duplicate and contradictory comments removed!
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
I ended up introducing a new sub-section on instance termination.
-
Joachim Breitner authored
-
Joachim Breitner authored
By passing -O2, the bug appears depending on the order of clauses in "solve", hence adding T9938B as the other variant. Currently, T9938 is marked as broken, but maybe the bug is actually in T9938B, where something (possibly inlining, as suggested by rwbarton) affected the requirement to link against transformers.
-
- 29 Dec, 2014 4 commits
-
-
Joachim Breitner authored
Marked as known_broken
-
Edward Z. Yang authored
Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: austin, erikd Reviewed By: erikd Subscribers: erikd, carter, thomie Differential Revision: https://phabricator.haskell.org/D588
-
Peter Trommler authored
Summary: Flag `-l:` is GNU ld specific and not supported by the Mac OS X link editor. So we create a temporary file name lib<tmpname>.<so_ext> and link with the standard -l<tmpname> option on Linux and OS X. Fixes #9875 Test Plan: validate on Mac OS X Reviewers: austin, hvr, ezyang Reviewed By: ezyang Subscribers: carter, thomie, ezyang Differential Revision: https://phabricator.haskell.org/D579 GHC Trac Issues: #9875
-
Herbert Valerio Riedel authored
This was introduced in 1617a10a (re #5364)
-
- 28 Dec, 2014 5 commits
-
-
Erik de Castro Lopo authored
Summary: * Throw an error when cross-compiling without a target definition. When cross compiling via LLVM, a target 'datalayout' and 'triple' must be defined or LLVM will generate code for the compile host instead of the compile target. * Add aarch64-unknown-linux-gnu target. The datalayout and triple lines were found by using clang to compile a small C program and -emit-llvm to get the LLVM IR output. Signed-off-by:
Erik de Castro Lopo <erikd@mega-nerd.com> Test Plan: validate Reviewers: rwbarton, carter, hvr, bgamari, austin Reviewed By: austin Subscribers: carter, thomie, garious Differential Revision: https://phabricator.haskell.org/D585 GHC Trac Issues: #9895
-
cactus authored
This involves recognizing lines starting with `"pattern "` as declarations, keeping non-exported pattern synonyms in `deSugar`, and including pattern synonyms in the result of `hscDeclsWithLocation`.
-
Herbert Valerio Riedel authored
This drops a couple of `-fno-warn-*` which seem to have become obsolete by now. Moreover, with the cleaned up settings `./validate` passes with GHC 7.10.1 as bootstrap compiler.
-
Herbert Valerio Riedel authored
-
David Feuer authored
Summary: This makes it easier to see what is exported, and allows us to add non-exported top-level names. Reviewers: hvr, austin, ezyang Reviewed By: ezyang Subscribers: ezyang, carter, thomie Projects: #ghc Differential Revision: https://phabricator.haskell.org/D551 GHC Trac Issues: #9852
-
- 27 Dec, 2014 7 commits
-
-
Herbert Valerio Riedel authored
This removes compile warnings triggered by those modules due to redundant imports and/or due to tabs
-
Herbert Valerio Riedel authored
-
Herbert Valerio Riedel authored
-
Edward Z. Yang authored
Summary: This allows GHC HEAD to be bootstrapped using 7.10. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D589 GHC Trac Issues: #9652
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Joachim Breitner authored
-
Herbert Valerio Riedel authored
This should address #9924 as GHC's config.guess/sub versions need to be up to date anyway.
-
- 25 Dec, 2014 1 commit
-
-
Herbert Valerio Riedel authored
First attempt via 7a2c9dde wasn't working properly. This attempt should work better as it doesn't cause the makefile recipe to fail which causes `make` to emit additional varying output.
-
- 24 Dec, 2014 1 commit
-
-
rwbarton authored
Summary: I'm not really happy about perpetuating the hackish fix for #8696, but at least in the context of building with -fhpc, the performance cost should be negligible. I'm suspicious about PlainModuleInitLabel and the Windows stuff too, but I don't know what it does / can't test it (respectively) so I'll leave those alone for now. Hopefully out-of-process TH will save us from these hacks some day. The test is an adaptation of T8696. It's a bit more awkward since I couldn't think of a way to get cross-module tickbox references without optimizations (inlining), but ghci doesn't permit -O for some reason. Test Plan: harbormaster; validate Reviewers: austin Reviewed By: austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D583 GHC Trac Issues: #9762 Conflicts: testsuite/tests/ghci/scripts/all.T
-