Simon Peyton Jones [Mon, 5 Jan 2015 13:20:48 +0000 (13:20 +0000)]
Major patch to add -fwarn-redundant-constraints
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 [Mon, 5 Jan 2015 12:56:46 +0000 (12:56 +0000)]
Print singleton consraints without parens
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 [Mon, 5 Jan 2015 10:53:37 +0000 (10:53 +0000)]
Use a less fragile method for defaulting
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 [Mon, 5 Jan 2015 10:39:46 +0000 (10:39 +0000)]
Always generalise a partial type signature
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 [Sat, 3 Jan 2015 23:36:09 +0000 (23:36 +0000)]
Replace fixVarSet with transCloVarSet
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 [Sat, 3 Jan 2015 23:27:21 +0000 (23:27 +0000)]
Modify a couple of error messages slightly
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 [Tue, 6 Jan 2015 12:29:03 +0000 (12:29 +0000)]
Updaete perf numbers for 32-bit machines
Simon Peyton Jones [Tue, 6 Jan 2015 12:28:37 +0000 (12:28 +0000)]
Make the location in TcLclEnv and CtLoc into a RealSrcSpan
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.
Edward Z. Yang [Mon, 5 Jan 2015 21:20:46 +0000 (13:20 -0800)]
submodule update: remove html dependency from nofib.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Herbert Valerio Riedel [Sat, 3 Jan 2015 22:17:14 +0000 (23:17 +0100)]
Update Cabal submodule to latest 1.22 snapshot
Edward Z. Yang [Sat, 27 Dec 2014 18:50:01 +0000 (10:50 -0800)]
Fix #9243 so recompilation avoidance works with -fno-code
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 [Sat, 27 Dec 2014 05:56:54 +0000 (21:56 -0800)]
Don't do a half-hearted recompilation check in compileOne
Summary:
The isNothing maybe_old_linkable check predates
48bc81ad466edfc80237015dbe5d78ba70eb5095, 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 [Sat, 3 Jan 2015 13:39:52 +0000 (14:39 +0100)]
Mark T9938 as not broken
either one of the two recent commits (d8d0031, fd97d2a) fixed it, or
there is some nondeterminism here. See #9938.
Simon Peyton Jones [Wed, 31 Dec 2014 10:21:43 +0000 (10:21 +0000)]
When solving one Given from another, use the depth to control which way round
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 [Wed, 31 Dec 2014 10:02:24 +0000 (10:02 +0000)]
Eliminate the final two calls to xCtEvidence
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.
Simon Peyton Jones [Tue, 30 Dec 2014 16:36:36 +0000 (16:36 +0000)]
Comments only, mainly on superclasses
This tidies up all the comments about recursive superclasses
and when to add superclasses. Lots of duplicate and contradictory
comments removed!
Simon Peyton Jones [Tue, 30 Dec 2014 13:55:45 +0000 (13:55 +0000)]
Comments only (mainly about HsWithBndrs)
Simon Peyton Jones [Tue, 30 Dec 2014 10:58:15 +0000 (10:58 +0000)]
Improve documentation of -XFlexibleInstances
I ended up introducing a new sub-section on instance termination.
Joachim Breitner [Tue, 30 Dec 2014 11:49:40 +0000 (12:49 +0100)]
Update nofib submodule, unbreak cryptarithm2
Joachim Breitner [Tue, 30 Dec 2014 10:38:25 +0000 (11:38 +0100)]
Refine test case for #9938
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.
Joachim Breitner [Mon, 29 Dec 2014 18:37:19 +0000 (19:37 +0100)]
Test case for #9938
Marked as known_broken
Edward Z. Yang [Mon, 29 Dec 2014 16:36:21 +0000 (11:36 -0500)]
Skip T2276_ghci on Darwin, since stdcall is not supported.
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 [Mon, 29 Dec 2014 16:33:24 +0000 (11:33 -0500)]
Fix system linker on Mac OS X
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 [Mon, 29 Dec 2014 08:14:05 +0000 (09:14 +0100)]
Fix `heapSizeSuggesionAuto` typo (#9934)
This was introduced in
1617a10a (re #5364)
Erik de Castro Lopo [Sat, 27 Dec 2014 10:11:52 +0000 (21:11 +1100)]
LlvmCodeGen cross-compiling fixes (#9895)
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
Dr. ERDI Gergo [Sun, 28 Dec 2014 03:51:00 +0000 (11:51 +0800)]
Support pattern synonyms in GHCi (fixes #9900)
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 [Sun, 28 Dec 2014 10:54:44 +0000 (11:54 +0100)]
Update validate-settings.mk
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 [Sun, 28 Dec 2014 10:14:50 +0000 (11:14 +0100)]
Update parallel submodule to 3.2.0.6 release
David Feuer [Sun, 28 Dec 2014 01:53:37 +0000 (20:53 -0500)]
Add export lists to some modules.
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
Herbert Valerio Riedel [Sat, 27 Dec 2014 22:50:21 +0000 (23:50 +0100)]
Update hoopl and hpc submodules
This removes compile warnings triggered by those modules due to redundant
imports and/or due to tabs
Herbert Valerio Riedel [Sat, 27 Dec 2014 22:43:20 +0000 (23:43 +0100)]
Avoid redundant-import warning (w/o CPP)
Herbert Valerio Riedel [Sat, 27 Dec 2014 22:39:18 +0000 (23:39 +0100)]
Update hsc2hs submodule for de-tabbing
Edward Z. Yang [Sat, 27 Dec 2014 15:57:30 +0000 (10:57 -0500)]
Use directory-style database for bootstrapping database
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 [Sat, 27 Dec 2014 15:10:37 +0000 (10:10 -0500)]
We do emit a warning for stdcall now.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Joachim Breitner [Sat, 27 Dec 2014 15:01:54 +0000 (16:01 +0100)]
Run T9762 only if dynamic libraries are available
Herbert Valerio Riedel [Sat, 27 Dec 2014 08:11:16 +0000 (09:11 +0100)]
Copy GHC's config.guess/sub over libffi's versions
This should address #9924 as GHC's config.guess/sub versions need to be
up to date anyway.
Herbert Valerio Riedel [Thu, 25 Dec 2014 22:16:28 +0000 (23:16 +0100)]
2nd attempt to fix T9032 test-case
First attempt via
7a2c9dde24b72f 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.
Reid Barton [Tue, 23 Dec 2014 21:53:16 +0000 (16:53 -0500)]
Fix linker interaction between Template Haskell and HPC (#9762)
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
Reid Barton [Tue, 23 Dec 2014 21:16:29 +0000 (16:16 -0500)]
Make ghc -e fail on invalid declarations
Summary:
Note: This commit includes an API change to GhciMonad.runDecls
to allow the caller to determine whether the declarations were
run successfully or not.
Test Plan: harbormaster
Reviewers: austin
Reviewed By: austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D582
Reid Barton [Tue, 23 Dec 2014 20:22:01 +0000 (15:22 -0500)]
Make ghc -e not exit on valid import commands (#9905)
Summary:
Some Trues and Falses were mixed up due to Bool being used in
different senses in different parts of GHCi.
Test Plan: harbormaster; validate
Reviewers: austin
Reviewed By: austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D581
GHC Trac Issues: #9905
Conflicts:
ghc/InteractiveUI.hs
Herbert Valerio Riedel [Tue, 23 Dec 2014 17:10:20 +0000 (18:10 +0100)]
Fixup
edd233acc19d269385 (T9032 test)
This is not a proper fix as the `x` in `make[x]: ...` changes depending on how
the testsuite was called. So this probably only works when invoked via ./validate.
Simon Peyton Jones [Tue, 23 Dec 2014 15:59:30 +0000 (15:59 +0000)]
Test earlier for self-import (Trac #9032)
This patch makes the renamer check for self-import, especially when
dependencies change, because the typechecker can fall over if that
happens.
I'm still uneasy about *indirect* self-import, but I'll leave that for
another day
Simon Peyton Jones [Tue, 23 Dec 2014 15:45:09 +0000 (15:45 +0000)]
Attempt to improve cleaning
I found several tests that failed when the interface file format changed,
due to leftover .hi file droppings.
I'm not sure I've done this right, but it should be a bit better
Simon Peyton Jones [Tue, 23 Dec 2014 15:44:00 +0000 (15:44 +0000)]
A bit of refactoring to TcErrors
This replaces a bunch of boolean flags in ReportErrCtxt with
an algebraic data type to say how to handle expression holes
and type holes
No change in functionality; I just found myself unable to understand
the code easily, when thinking about something else. Result is
quite nice, I think.
Simon Peyton Jones [Tue, 23 Dec 2014 15:41:59 +0000 (15:41 +0000)]
Comments only
Simon Peyton Jones [Tue, 23 Dec 2014 15:40:54 +0000 (15:40 +0000)]
Add a couple of missing cases to isTcReflCo and isTcReflCo_maybe
Simon Peyton Jones [Tue, 23 Dec 2014 15:39:50 +0000 (15:39 +0000)]
Eliminate so-called "silent superclass parameters"
The purpose of silent superclass parameters was to solve the
awkward problem of superclass dictinaries being bound to bottom.
See THE PROBLEM in Note [Recursive superclasses] in TcInstDcls
Although the silent-superclass idea worked,
* It had non-local consequences, and had effects even in Haddock,
where we had to discard silent parameters before displaying
instance declarations
* It had unexpected peformance costs, shown up by Trac #3064 and its
test case. In monad-transformer code, when constructing a Monad
dictionary you had to pass an Applicative dictionary; and to
construct that you neede a Functor dictionary. Yet these extra
dictionaries were often never used. (All this got much worse when
we added Applicative as a superclass of Monad.) Test T3064
compiled *far* faster after silent superclasses were eliminated.
* It introduced new bugs. For example SilentParametersOverlapping,
T5051, and T7862, all failed to compile because of instance overlap
directly because of the silent-superclass trick.
So this patch takes a new approach, which I worked out with Dimitrios
in the closing hours before Christmas. It is described in detail
in THE PROBLEM in Note [Recursive superclasses] in TcInstDcls.
Seems to work great!
Quite a bit of knock-on effect
* The main implementation work is in tcSuperClasses in TcInstDcls
Everything else is fall-out
* IdInfo.DFunId no longer needs its n-silent argument
* Ditto IDFunId in IfaceSyn
* Hence interface file format changes
* Now that DFunIds do not have silent superclass parameters, printing
out instance declarations is simpler. There is tiny knock-on effect
in Haddock, so that submodule is updated
* I realised that when computing the "size of a dictionary type"
in TcValidity.sizePred, we should be rather conservative about
type functions, which can arbitrarily increase the size of a type.
Hence the new datatype TypeSize, which has a TSBig constructor for
"arbitrarily big".
* instDFunType moves from TcSMonad to Inst
* Interestingly, CmmNode and CmmExpr both now need a non-silent
(Ord r) in a couple of instance declarations. These were previously
silent but must now be explicit.
* Quite a bit of wibbling in error messages
Simon Peyton Jones [Mon, 22 Dec 2014 14:35:24 +0000 (14:35 +0000)]
Add a small comment
Joe Hillenbrand [Tue, 23 Dec 2014 15:15:20 +0000 (09:15 -0600)]
always use 'mkdir -p' and fix missing dir (fixes #9876)
Summary: Signed-off-by: Joe Hillenbrand <joehillen@gmail.com>
Reviewers: thomie, austin
Reviewed By: thomie, austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D566
GHC Trac Issues: #9876
Sergei Trofimovich [Tue, 23 Dec 2014 14:55:06 +0000 (08:55 -0600)]
dwarf: sync getIdFromTrivialExpr with exprIsTrivial (test break028 and others)
Summary:
The bug manifests when built with
EXTRA_HC_OPTS += -g
+++ ./ghci.debugger/scripts/break028.run.stderr 2014-12-19 23:08:46.
199876621 +0000
@@ -0,0 +1,11 @@
+ghc-stage2: panic! (the 'impossible' happened)
+ (GHC version 7.9.
20141219 for x86_64-unknown-linux):
+ getIdFromTrivialExpr x_alJ
+
+Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
+
+
+<interactive>:3:1: Not in scope: ‘g’
+
+<interactive>:3:3: Not in scope: data constructor ‘False’
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
Reviewers: simonmar, austin, scpmw
Reviewed By: scpmw
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D580
Thomas Winant [Tue, 23 Dec 2014 14:48:29 +0000 (08:48 -0600)]
Rename NamedWildcards flag to NamedWildCards
Summary:
Mind the capital C. As there is already a flag RecordWildCards with a capital
C, we should at least try to be consistent in the spelling of WildCards.
Test Plan: validate
Reviewers: goldfire, simonpj, austin
Reviewed By: simonpj, austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D584
Thomas Winant [Tue, 23 Dec 2014 14:48:15 +0000 (08:48 -0600)]
Fix panic on :kind _ in GHCi (Trac #9879)
Summary:
Running `:kind _` in GHCi produced a panic, fix it by extracting the
wildcards. Now, `:kind _` produces `_ :: k0`. Unfortunately, a `0` is
added after the kind is tidied and I haven't found a way to get rid of
it...
This does not fix the other panic involving TemplateHaskell mentioned
in #9879.
Test Plan: new test GHCiWildcardKind should pass
Reviewers: austin, simonpj
Reviewed By: austin
Subscribers: simonpj, carter, thomie, monoidal
Differential Revision: https://phabricator.haskell.org/D572
GHC Trac Issues: #9879
Austin Seipp [Tue, 23 Dec 2014 14:46:59 +0000 (08:46 -0600)]
docs: create 7.12.1 relnotes
Signed-off-by: Austin Seipp <austin@well-typed.com>
Facundo Domínguez [Mon, 22 Dec 2014 21:20:11 +0000 (19:20 -0200)]
fix spInfoSrcLoc field name
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D574
Facundo Domínguez [Mon, 22 Dec 2014 21:15:36 +0000 (19:15 -0200)]
Groom comments related to StaticPointers.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D575
Richard Eisenberg [Mon, 22 Dec 2014 18:23:11 +0000 (13:23 -0500)]
Expand notes in TcFlatten
Herbert Valerio Riedel [Mon, 22 Dec 2014 16:21:49 +0000 (17:21 +0100)]
Bump GHC version from 7.9 to 7.11
This needs to update the Haddock submodule as well
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Herbert Valerio Riedel [Mon, 22 Dec 2014 16:35:39 +0000 (17:35 +0100)]
Fix typo in GLASGOW_HASKELL_PATCHLEVEL2 macro
This typo slipped in through
3549c952b535803270872adaf87262f2df0295a4
Austin Seipp [Mon, 22 Dec 2014 16:02:59 +0000 (10:02 -0600)]
Revert "Bump version to 7.11"
This reverts commit
18bf6d5de5c8eed68584921f46efca79d7d59d6a.
We forgot to tweak some of the submodule bounds. Fixes incoming soon.
Austin Seipp [Mon, 22 Dec 2014 15:48:13 +0000 (09:48 -0600)]
Bump version to 7.11
Signed-off-by: Austin Seipp <austin@well-typed.com>
Simon Peyton Jones [Mon, 22 Dec 2014 12:43:58 +0000 (12:43 +0000)]
Comments only
Simon Peyton Jones [Mon, 22 Dec 2014 12:00:10 +0000 (12:00 +0000)]
For :info, return all matching Names, rather than complaining about ambiguity
This fixes Trac #9881, and gives more helpful output in the case of ambiguity.
Certainly more helpful than the positively-misleading error we get right now.
Herbert Valerio Riedel [Mon, 22 Dec 2014 11:45:34 +0000 (12:45 +0100)]
Update containers submodule to 0.5.6.2 release
Herbert Valerio Riedel [Mon, 22 Dec 2014 11:44:33 +0000 (12:44 +0100)]
Update pretty and random submodules
This updates those two packages to their most recent respective proper
releases.
Dr. ERDI Gergo [Mon, 22 Dec 2014 11:01:37 +0000 (19:01 +0800)]
Strip leading whitespace before checking if a statement looks like a declaration (fixes #9914)
Dr. ERDI Gergo [Sun, 21 Dec 2014 08:19:42 +0000 (16:19 +0800)]
Add expected output to T9915 test
Dr. ERDI Gergo [Sun, 21 Dec 2014 07:07:43 +0000 (15:07 +0800)]
Check dflags for language extensions when deciding if "foreign " and "deriving "
look like prefixes of valid declarations (fixes #9915)
Luite Stegeman [Sat, 20 Dec 2014 00:30:08 +0000 (18:30 -0600)]
trac #9744, make program name and product version configurable through DynFlags/Settings
Summary:
This allows GHC API clients to use a package database and dynamic
library names that do not clash with those of the host GHC
This also updates the Haddock submodule.
Reviewers: hvr, austin
Reviewed By: austin
Subscribers: thomie, carter
Differential Revision: https://phabricator.haskell.org/D496
Luite Stegeman [Sat, 20 Dec 2014 00:28:17 +0000 (18:28 -0600)]
add runMeta hook
Summary:
The runMeta hook can be used to override how metaprogramming expressions
are evaluated. It makes the metaprogramming request types explicit and
has access to the TcM monad. This makes it a much more convenient starting
point for implementing out of process Template Haskell than the existing
hscCompileCoreExpr hook.
Reviewers: hvr, edsko, austin, simonpj
Reviewed By: austin
Subscribers: thomie, carter
Differential Revision: https://phabricator.haskell.org/D501
Dr. ERDI Gergo [Sat, 20 Dec 2014 13:34:08 +0000 (21:34 +0800)]
Use a new $b prefix for pattern synonym builder names, instead of re-using $W from wrappers
Richard Eisenberg [Sat, 20 Dec 2014 03:35:03 +0000 (22:35 -0500)]
Change performance numbers for T3064
Richard Eisenberg [Thu, 18 Dec 2014 04:30:15 +0000 (23:30 -0500)]
Optimize flattener by trying to reduce a TF before reducing its args.
This has a demonstrated 2x speed boost on the T9872{a,b,c} tests.
(#9872)
Edward Z. Yang [Sat, 20 Dec 2014 02:23:52 +0000 (21:23 -0500)]
Improved Backpack IR description. [skip ci]
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Herbert Valerio Riedel [Fri, 19 Dec 2014 22:36:14 +0000 (23:36 +0100)]
Update hoopl submodule to 3.10.0.2 rls
[skip ci]
Herbert Valerio Riedel [Fri, 19 Dec 2014 20:37:58 +0000 (21:37 +0100)]
Update Cabal submodule to latest 1.22 branch tip
Herbert Valerio Riedel [Fri, 19 Dec 2014 20:36:18 +0000 (21:36 +0100)]
Update directory submodule to latest snapshot
This pulls in
> make `getModificationTime` support sub-second resolution on windows
Herbert Valerio Riedel [Fri, 19 Dec 2014 16:35:24 +0000 (17:35 +0100)]
Update Cabal submodule to latest 1.22 branch tip
Richard Eisenberg [Fri, 19 Dec 2014 15:29:54 +0000 (10:29 -0500)]
Add instance Lift Natural
Simon Peyton Jones [Fri, 19 Dec 2014 15:25:51 +0000 (15:25 +0000)]
Add Jan Stolarek's test for Trac #9872
Richard Eisenberg [Fri, 19 Dec 2014 15:19:55 +0000 (10:19 -0500)]
Update release notes for recent language and TH changes.
Richard Eisenberg [Tue, 16 Dec 2014 22:21:42 +0000 (17:21 -0500)]
Clarify that declaration splices exist at top level only. (#9880)
Richard Eisenberg [Tue, 16 Dec 2014 22:17:06 +0000 (17:17 -0500)]
Merge some instances from th-orphans.
Richard Eisenberg [Tue, 16 Dec 2014 22:15:49 +0000 (17:15 -0500)]
Consider equality contexts exotic, uninferrable by "deriving"
See comments in #8984. This takes back the fix for #6088.
Herbert Valerio Riedel [Fri, 19 Dec 2014 10:08:09 +0000 (11:08 +0100)]
Add Data.Version.makeVersion & `IsList Version`
These two facilities provide some means to avoid the double-breakage caused by
first by the deprecation (see #2496), and then again by the actual future
field-removal.
See also
https://groups.google.com/d/msg/haskell-core-libraries/q9H-QlL_gnE/4lbb_mBjre8J
for details about this library addition.
Reviewed By: ekmett
Differential Revision: https://phabricator.haskell.org/D577
Jan Stolarek [Fri, 19 Dec 2014 10:10:50 +0000 (11:10 +0100)]
Relocate bash completion scripts to utils/
Herbert Valerio Riedel [Fri, 19 Dec 2014 09:57:03 +0000 (10:57 +0100)]
Update process and unix submodules
This updates the submodules to the respective final releases,
- `unix-2.7.1.0`, and
- `process-1.2.1.0`
Peter Wortmann [Thu, 18 Dec 2014 20:11:23 +0000 (21:11 +0100)]
Some Dwarf generation fixes
- Make abbrev offset absolute on Non-Mac systems
- Add another termination byte at the end of the abbrev section
(readelf complains)
- Scope combination was wrong for the simpler cases
- Shouldn't have a "global/" in front of all scopes
Herbert Valerio Riedel [Thu, 18 Dec 2014 22:15:03 +0000 (23:15 +0100)]
Update Cabal submodule to 1.22 version
Herbert Valerio Riedel [Thu, 18 Dec 2014 20:49:17 +0000 (21:49 +0100)]
Update `bytestring` submodule
this just pulls in the version bump to 0.10.6
Simon Peyton Jones [Thu, 18 Dec 2014 11:19:14 +0000 (11:19 +0000)]
Fix wrong-kind-of-family error message (Trac #9896)
Adam Gundry [Thu, 18 Dec 2014 08:04:20 +0000 (08:04 +0000)]
Amend TcPluginM interface
Summary:
Expose some new functions in TcPluginM and remove one, in the light of
experience writing plugins. In particular, I've removed lookupRdrName
because using it to import modules containing instances leads to subtle
bugs; I've expanded on the lookupRdrNameInModuleForPlugins comments.
Test Plan: validate
Reviewers: simonpj, austin
Reviewed By: austin
Subscribers: goldfire, ezyang, carter, thomie, yav, gridaphobe
Differential Revision: https://phabricator.haskell.org/D553
Conflicts:
compiler/typecheck/TcSMonad.hs
Mateusz Kowalczyk [Thu, 18 Dec 2014 07:32:07 +0000 (07:32 +0000)]
Update Haddock submodule
Iavor S. Diatchki [Thu, 18 Dec 2014 02:46:36 +0000 (18:46 -0800)]
Add a provenance field to universal coercions.
Universal coercions allow casting between arbitrary types, so it is a
good idea to keep track where they came from, which now we can do by
using the provenance field in `UnivCo`.
This is also handy for type-checker plugins that provide functionality
beyond what's expressible by GHC's standard coercions: such plugins
can generate universal coercions, but they should still tag them,
so that if something goes wrong we can link the casts to the plugin.
Gabor Greif [Wed, 17 Dec 2014 16:04:24 +0000 (17:04 +0100)]
Minor typo in comment
Gabor Greif [Wed, 17 Dec 2014 15:26:39 +0000 (16:26 +0100)]
Typo in note
Gabor Greif [Wed, 17 Dec 2014 15:13:26 +0000 (16:13 +0100)]
Typos in comments
Richard Eisenberg [Tue, 16 Dec 2014 21:35:43 +0000 (16:35 -0500)]
Performance enhancements in TcFlatten.
This commit fixes some performance regressions introduced by 0cc47eb,
adding more `Coercible` magic to the solver. See Note
[flatten_many performance] in TcFlatten for more info.
The improvements do not quite restore the old numbers. Given that
the solver is really more involved now, I am accepting this regression.
The way forward (I believe) would be to have *two* flatteners: one
that deals only with nominal equalities and thus never checks roles,
and the more general one. A nice design of keeping this performant
without duplicating code eludes me, but someone else is welcome
to take a stab.
Simon Peyton Jones [Wed, 17 Dec 2014 14:30:28 +0000 (14:30 +0000)]
Wibble error message
Simon Peyton Jones [Wed, 17 Dec 2014 14:20:51 +0000 (14:20 +0000)]
Fix egregious bug in the new canonicalisation code for AppTy
Fixes Trac #9892.
Must form part of 7.10.1
Simon Peyton Jones [Tue, 16 Dec 2014 17:53:15 +0000 (17:53 +0000)]
Comment in test