| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
(cherry picked from commit 8c5405f63c2de0c445ec171aab63c35786544b9e)
|
|
|
|
| |
(cherry picked from commit 09396ec3bb672e761c3e627484dd02c5a3a76c77)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: If it builds, ship it
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3772
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a conservative assumption which will limit some uses of spliced
patterns, but it fixes #13984.
Test Plan: Validate
Reviewers: RyanGlScott, AaronFriel, austin
Reviewed By: RyanGlScott
Subscribers: rwbarton, thomie
GHC Trac Issues: #13984
Differential Revision: https://phabricator.haskell.org/D3766
|
|
|
|
|
| |
This reverts commit b2d3ec370b97fe5f448e8f1d4e0b7374c63c60a8. Didn't
mean to push this one.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #13803, but adds a note about a yet to be fixed #13981.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: bgamari, austin
Reviewed By: bgamari
Subscribers: simonpj, rwbarton, thomie
GHC Trac Issues: #13803
Differential Revision: https://phabricator.haskell.org/D3742
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test T13701 was failing sporadically. The problem manifested while the
test was run on a system under load. Profiling showed the increased
allocations were in SysTools.builderMainLoop.loop, during calls to the
assembler. This was due to loop effectively busy-waiting from when both
stdin and stderr handles were closed, until getProcessExitCode
succeeded.
This is fixed by removing exit code handling from loop. We now wait for
loop to finish, then read the exit code with waitForProcess.
Some exception safety is added: the readerProc threads will now be
killed and the handles will be closed if an exception is thrown.
A TODO saying that threads dying is not accounted for is removed. I
believe that this case is handled by readerProc sending EOF in a finally
clause.
Test Plan:
Replicate test failures using procedure on the ticket, verify that they
do not occur with this patch.
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #13987
Differential Revision: https://phabricator.haskell.org/D3748
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes #13915, where the promoted tycons belonging to data family
instances wouldn't get Typeable bindings, resulting in missing
declarations.
Test Plan: Validate with included testcases
Reviewers: austin, simonpj
Reviewed By: simonpj
Subscribers: simonpj, RyanGlScott, rwbarton, thomie
GHC Trac Issues: #13915
Differential Revision: https://phabricator.haskell.org/D3759
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An error message was referring to a type synonym as a datatype.
Annoyingly, learning that the TyCon over which the error message is
operating is actually a type synonym was previously impossible, since
that code only had access to a TcTyCon, which doesn't retain any
information about what sort of TyCon it is.
To rectify this, I created a new TyConFlavour datatype, intended to
capture roughly what sort of TyCon we're dealing with. I then performing
the necessary plumbing to ensure all TcTyCons have a TyConFlavour, and
propagated this information through to the relevant error message.
Test Plan: ./validate
Reviewers: goldfire, austin, bgamari, simonpj
Reviewed By: simonpj
Subscribers: simonpj, rwbarton, thomie
GHC Trac Issues: #13983
Differential Revision: https://phabricator.haskell.org/D3747
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This amounts to a one-line change in `tcExpr`. I've added a Note to
explain what is going on.
This requires a separate change in the pattern-match checker to
account for the fact that typechecked `[]` expressions become
`ConLikeOut`s, not `ExplicitList`s.
Test Plan: make test TEST=T13680
Reviewers: goldfire, mpickering, austin, bgamari
Reviewed By: mpickering, bgamari
Subscribers: rwbarton, thomie, goldfire
GHC Trac Issues: #13680
Differential Revision: https://phabricator.haskell.org/D3733
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate
Reviewers: austin, simonmar
Reviewed By: simonmar
Subscribers: simonmar, rwbarton, thomie
GHC Trac Issues: #13434
Differential Revision: https://phabricator.haskell.org/D3724
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When loading/reloading with a large number of modules
(>5000) the cost of linear lookups becomes significant.
The changes here made `:reload` go from 6s to 1s on my
test case.
The bottlenecks were `needsLinker` in `DriverPipeline` and
`getModLoop` in `GhcMake`.
Test Plan: ./validate
Reviewers: simonmar, austin, bgamari
Subscribers: thomie, rwbarton
Differential Revision: https://phabricator.haskell.org/D3703
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: If it builds, ship it
Reviewers: austin, bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3729
|
|
|
|
| |
This test appears to be quite unstable.
|
|
|
|
| |
It seems to be the change to getNameToInstancesIndex that bumped these.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we load non absolute pathed .so's this usually implies that we
expect the system to have them in place already, and hence we should not
need to ship them. Without the absolute path to the library, we are
also unable to open and send said library. Thus we'll do library
shipping only for libraries with absolute paths.
When dealing with a host and target of different word size (say host
hast 64bit, target has 32bit), we need to fix the RemotePtr size and the
toWordArray function, as they are part of the iserv ResolvedBCO binary
protocol. This needs to be word size independent. The choice for
RemotePtr to 64bit was made to ensure we can store 64bit pointers when
targeting 64bit. The choice for 32bit word arrays was made wrt.
encoding/decoding on the potentially slower device.
The efficient serialization code has been graciously provided by
@bgamari.
Reviewers: bgamari, simonmar, austin, hvr
Reviewed By: bgamari
Subscribers: Ericson2314, rwbarton, thomie, ryantrinkle
Differential Revision: https://phabricator.haskell.org/D3443
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously -Werror or -Werror=flag printed warnings as usual and then
printed
these two lines:
<no location info>: error:
Failing due to -Werror.
This is not ideal: first, it's not clear which flag made one of the
warnings an
error. Second, warning messages are not modified in any way, so there's
no way
to know which warnings caused this error.
With this patch we (1) promote warning messages to error messages if a
relevant
-Werror is enabled (2) mention which -Werror is used during this
promotion.
Previously:
[1 of 1] Compiling Main ( test.hs, test.o )
test.hs:9:10: warning: [-Wincomplete-patterns]
Pattern match(es) are non-exhaustive
In a case alternative: Patterns not matched: (C2 _)
|
9 | sInt s = case s of
| ^^^^^^^^^...
test.hs:12:14: warning: [-Wmissing-fields]
• Fields of ‘Rec’ not initialised: f2
• In the first argument of ‘print’, namely ‘Rec {f1 =
1}’
In the expression: print Rec {f1 = 1}
In an equation for ‘main’: main = print Rec {f1 = 1}
|
12 | main = print Rec{ f1 = 1 }
| ^^^^^^^^^^^^^
<no location info>: error:
Failing due to -Werror.
Now:
[1 of 1] Compiling Main ( test.hs, test.o )
test.hs:9:10: error: [-Wincomplete-patterns,
-Werror=incomplete-patterns]
Pattern match(es) are non-exhaustive
In a case alternative: Patterns not matched: (C2 _)
|
9 | sInt s = case s of
| ^^^^^^^^^...
test.hs:12:14: error: [-Wmissing-fields, -Werror=missing-fields]
• Fields of ‘Rec’ not initialised: f2
• In the first argument of ‘print’, namely ‘Rec {f1 =
1}’
In the expression: print Rec {f1 = 1}
In an equation for ‘main’: main = print Rec {f1 = 1}
|
12 | main = print Rec{ f1 = 1 }
| ^^^^^^^^^^^^^
Test Plan: - Update old tests, add new tests if there aren't any
relevant tests
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3709
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously datatype names were not paraenthesized (#13887).
Reviewers: austin, bgamari, RyanGlScott
Reviewed By: RyanGlScott
Subscribers: RyanGlScott, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3717
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 2484d4dae65c81f218dcfe494b963b2630bb8fa6 accidentally dropped a
call to `isUnboundName` in an important location. This re-adds it.
Fixes #13947.
Test Plan: make test TEST=T13947
Reviewers: adamgundry, austin, bgamari
Reviewed By: adamgundry
Subscribers: rwbarton, thomie
GHC Trac Issues: #13947
Differential Revision: https://phabricator.haskell.org/D3718
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 343cb32d0983f576d344a2d04a35c3fd6eecf2c5 (#13568) made GHC a bit
too cavalier in suggesting when data constructors are in scope (and
suggesting the use of `DataKinds`). This tones down the suggestions so
that `DataKinds` is only suggested if a data constructor of that name is
actually in scope (previously, it would always suggest, even if it was
out of scope).
Fixes #13948.
Test Plan: ./validate
Reviewers: mpickering, austin, bgamari
Reviewed By: mpickering
Subscribers: rwbarton, thomie
GHC Trac Issues: #13948
Differential Revision: https://phabricator.haskell.org/D3719
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
transitive_deps_set was incorrect, it was not considering the
dependencies of dependencies in some cases. I've corrected it and tidied
it up a little.
The test case from leftaroundabout, as linked to from the ticket, is
added with small modifications to flatten directory structure.
Test Plan: make test TEST=T13949
Reviewers: austin, bgamari, alexbiehl
Reviewed By: alexbiehl
Subscribers: rwbarton, thomie, alexbiehl
GHC Trac Issues: #13949
Differential Revision: https://phabricator.haskell.org/D3720
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: RyanGlScott, austin, goldfire, bgamari
Reviewed By: RyanGlScott, goldfire, bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3715
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although derived `Read`, `Show`, and `Generic` instances technically
don't //use// the record selectors of the data type for which an
instance is being derived, the derived code is affected by the
//presence// of record selectors. As a result, we should suppress
`-Wunused-binds` for those record selectors when deriving these classes.
This is accomplished by threading through more information from
`hasStockDeriving`.
Test Plan: make test TEST=T13919
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #13919
Differential Revision: https://phabricator.haskell.org/D3704
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Annotations currently fail to type check if they annotation cannot
be loaded into ghci, such as when built with -fno-code.
Test Plan: ./validate
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #13818
Differential Revision: https://phabricator.haskell.org/D3701
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: hvr, alanz, austin
Reviewed By: alanz
Subscribers: rwbarton, thomie
GHC Trac Issues: #13899
Differential Revision: https://phabricator.haskell.org/D3686
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change enables the addition of an arbitrary string to the output of
GHCi's ':info'. It was made for Coercible in particular but could be
extended if desired.
Updates haddock submodule.
Test Plan: Modified test 'ghci059' to match new output.
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: goldfire, rwbarton, thomie
GHC Trac Issues: #12390
Differential Revision: https://phabricator.haskell.org/D3634
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It now correctly prints the parens around '(Int -> Int)' in
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -ddump-splices #-}
module Bug where
$([d| f :: Either Int (Int -> Int)
f = undefined
|])
Closes #13942
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The normal object file on Windows has a limit of `2^16`
sections that can be in an object-file.
The `big-obj` format raises this to `2^32` sections.
The implementation is made difficult because we now need to support
two header formats and two section formats that differ only by a single
element size within each. The element that's different is in the middle
of the structs and since the structs are used to map regions of memory
directly, it means we need to know which struct it is when we do the
mapping or pointer arithmetics.
This is the final Object-Code format which Windows compilers can generate
which we do not support yet in GHCI. All other major compilers on the platforms
can produce it and all linkers consume it (bfd and lld).
See http://tinyurl.com/bigobj
This patch abstracts away retrieving the fields to functions which all take
an struct which describes which object format is currently being parsed.
These functions are always in-lined as they're small but would looks messy
being copy-pasted everywhere.
Test Plan:
./validate and new test `big-obj`
```
Tamar@Rage MINGW64 /r
$ gcc -c -Wa,-mbig-obj foo.c -o foo.o
Tamar@Rage MINGW64 /r
$ objdump -h foo.o
foo.o: file format pe-bigobj-x86-64
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000010 0000000000000000 0000000000000000 00000128 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000000 0000000000000000 0000000000000000 00000000 2**4
ALLOC, LOAD, DATA
2 .bss 00000000 0000000000000000 0000000000000000 00000000 2**4
ALLOC
3 .xdata 00000008 0000000000000000 0000000000000000 00000138 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .pdata 0000000c 0000000000000000 0000000000000000 00000140 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
5 .rdata$zzz 00000030 0000000000000000 0000000000000000 0000014c 2**4
CONTENTS, ALLOC, LOAD, READONLY, DATA
Tamar@Rage MINGW64 /r
$ echo main | ~/ghc/inplace/bin/ghc-stage2.exe --interactive bar.hs foo.o
GHCi, version 8.3.20170430: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Main ( bar.hs, interpreted )
Ok, modules loaded: Main.
*Main> 17
*Main> Leaving GHCi.
```
Reviewers: austin, bgamari, erikd, simonmar
Subscribers: awson, rwbarton, thomie, #ghc_windows_task_force
GHC Trac Issues: #13815
Differential Revision: https://phabricator.haskell.org/D3523
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin
Subscribers: dfeuer, rwbarton, thomie
GHC Trac Issues: #13615
Differential Revision: https://phabricator.haskell.org/D3696
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It should respond with True to both BF_PINNED and BF_LARGE byte arrays.
However, previously it would only check the BF_PINNED flag.
Test Plan: Validate
Reviewers: simonmar, austin, erikd
Subscribers: winterland1989, rwbarton, thomie
GHC Trac Issues: #13894
Differential Revision: https://phabricator.haskell.org/D3685
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: unit tests, built docs
Reviewers: dfeuer, bgamari, simonpj, austin, erikd
Subscribers: rwbarton, thomie
GHC Trac Issues: #13875, #13242
Differential Revision: https://phabricator.haskell.org/D3691
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In commit 53c78be0aab76a3107c4dacbb1d177afacdd37fa object code is
generated for modules depended on by modules that use -XTemplateHaskell.
This turns the same logic on for modules that use -XQuasiQuotes.
A test is added.
Note that I've based this of D3646, as it has a function I want to use.
Test Plan: ./validate
Reviewers: austin, bgamari, alexbiehl
Reviewed By: alexbiehl
Subscribers: alexbiehl, rwbarton, thomie
GHC Trac Issues: #13863
Differential Revision: https://phabricator.haskell.org/D3677
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we we only using `tcSplitSigmaTy` when determining if a
function had been applied to too few arguments, so it wouldn't work for
functions with nested `forall`s. Thankfully, this is easily fixed with a
dash of `tcSplitNestedSigmaTys`.
Test Plan: make test TEST=T13311
Reviewers: austin, bgamari, simonpj
Reviewed By: bgamari
Subscribers: goldfire, simonpj, rwbarton, thomie
GHC Trac Issues: #13311
Differential Revision: https://phabricator.haskell.org/D3678
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Added a test which was previously failing
Reviewers: austin, bgamari, simonpj
Reviewed By: simonpj
Subscribers: simonpj, rwbarton, thomie
GHC Trac Issues: #13914
Differential Revision: https://phabricator.haskell.org/D3698
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan:
* New unit tests
* validate
Reviewers: dfeuer, simonpj, niteria, bgamari, austin, erikd
Reviewed By: dfeuer
Subscribers: rwbarton, thomie
GHC Trac Issues: #13875
Differential Revision: https://phabricator.haskell.org/D3681
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The configure script will now try to coerce gcc to use the linker
pointed to by $LD instead of the system default (typically bfd ld).
Moreover, we now check for `ld.gold` and `ld.lld` before trying `ld`.
The previous behavior can be reverted to by using the new
--disable-ld-override flag.
On my machine gold seems to trigger an apparent infelicity in
constructor behavior, causing T5435_asm to fail. I've opened #13883 to
record this issue and have accepted the questionable constructor
ordering for the time being.
Test Plan: Validate with `config_args='--enable-ld-override'`
Reviewers: austin, hvr, simonmar
Subscribers: duog, nh2, rwbarton, thomie, erikd, snowleopard
GHC Trac Issues: #13541, #13810, #13883
Differential Revision: https://phabricator.haskell.org/D3449
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the missing branch for parsing the optional 'instance' keyword
in associated type family instance declarations.
Fixes #13747
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: simonpj, RyanGlScott, rwbarton, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D3673
|
|
|
|
|
|
|
|
|
|
|
| |
For some reason, this test seems to allocate rather more under
Linux than under OSX or Windows.
Reviewers: austin, bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3684
|
|
|
|
|
|
|
|
|
|
| |
Trac #13881 showed that our handling of lexically scoped type
variables was way off when we bring into scope a name 'y' for
a pre-existing type variable 'a', perhaps with an entirely
different name.
This patch fixes it; see TcHsType
Note [Pattern signature binders]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trac #13879 showed that when we were trying to solve
(forall z1 (y1::z1). ty1) ~ (forall z2 (y2:z2). ty2)
we'd end up spitting out z1~z2 with no binding site for them.
Those kind equalities need to be inside the implication.
I ended up re-factoring the code for solving forall-equalities.
It's quite nice now.
|
|
|
|
|
|
| |
I had not intended on merging this.
This reverts commit b0708588e87554899c2efc80a2d3eba353dbe926.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When loading/reloading with a large number of modules
(>5000) the cost of linear lookups becomes significant.
The changes here made `:reload` go from 6s to 1s on my
test case.
The bottlenecks were `needsLinker` in `DriverPipeline` and
`getModLoop` in `GhcMake`.
Test Plan: ./validate
Reviewers: simonmar, austin, bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3646
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is another attempt at resolving #13594 by treating strict variable
binds as FunBinds instead of PatBinds (as suggested in comment:1).
Test Plan: Validate
Reviewers: austin, alanz
Subscribers: rwbarton, thomie, mpickering
GHC Trac Issues: #13594
Differential Revision: https://phabricator.haskell.org/D3670
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was previously a panic and caused #13871. I believe just saying
these types simply aren't Typeable should be correct.
Test Plan: Validate, check `T13871`
Reviewers: goldfire, austin
Subscribers: rwbarton, thomie, RyanGlScott
GHC Trac Issues: #13871
Differential Revision: https://phabricator.haskell.org/D3672
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate
Reviewers: austin
Subscribers: rwbarton, thomie, RyanGlScott
GHC Trac Issues: #13871
Differential Revision: https://phabricator.haskell.org/D3671
|