| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: doc only
Reviewers: bgamari, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1776
GHC Trac Issues: #11015
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch comes from @awson
{{{
Playing with `-fsplit-sections` on Windows I've found a pile of ancient
(it was borrowed from Hugs interpreter code and I don't even know when
was it created), absolutely redundant and plain wrong code in RTS linker.
Technically it is a bug, but it doesn't break things when used with
current Windows binutils with no special linker scripts involved.
OTOH, it slows down runtime linker on Windows noticeably and thus can
be considered as a performance bug.
The nice side-effect for existing users is that GHCi now loads compiled
object code much faster on Windows.
}}}
More specifically, sections were being looked up by name by doing a loop
over all sections until the section with the given name is found.
The new approach uses the section index and finds the section in O(1) time
based on information gathered when we originally processed the section
Test Plan: ./validate (was run on GHC x86)
Reviewers: austin, awson, erikd, thomie, bgamari
Reviewed By: thomie, bgamari
Subscribers: awson, #ghc_windows_task_force
Differential Revision: https://phabricator.haskell.org/D1773
GHC Trac Issues: #11388
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Fix exit code for Windows to match expected for out-of-memory test
Test Plan: ./validate
Reviewers: simonmar, austin, thomie, bgamari
Reviewed By: thomie, bgamari
Differential Revision: https://phabricator.haskell.org/D1753
GHC Trac Issues: #11422
|
|
|
|
|
|
|
|
|
| |
Previously oqtycon used AnnTilde for the location of the RdrName when
parsing (~).
The recent increase in '~' characters in the AST confuses
ghc-exactprint, so this patch treats all RdrNames the same way now,
marking the location of the core name with AnnValue.
|
|
|
|
| |
And document -dth-dec-file. Not sure how these were missed.
|
|
|
|
|
| |
Based off of
https://ghc.haskell.org/trac/ghc/wiki/LanguagePragmaHistory.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #11417.
|
| |
|
|
|
|
| |
This moves let-bindings right next to their use site.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't add parens unnecessarily when arguments of the application are all
hidden (because of parameters like -dsuppress-all,
-dsuppress-type-applications etc.)
Reviewers: bgamari, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1771
|
|
|
|
|
|
|
|
|
|
| |
Consider
type family F :: Type -> Type where
F = TypeError (Text "Error")
Now, if we see something like `F Int` we should still report the custom
type error.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: ./validate
Reviewers: austin, thomie, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D1756
GHC Trac Issues: #11389
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate
Reviewers: goldfire, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1770
GHC Trac Issues: #11120
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we were missing `Typeable` representations for several
wired-in types (and their promoted constructors). These include,
* `Nat`
* `Symbol`
* `':`
* `'[]`
Moreover, some constructors were incorrectly identified as being defined
in `GHC.Types` whereas they were in fact defined in `GHC.Prim`.
Ultimately this is just a temporary band-aid as there is general
agreement that we should eliminate the manual definition of these
representations entirely.
Test Plan: Validate
Reviewers: austin, hvr
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1769
GHC Trac Issues: #11120
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These 3 functions are useful to keep around a bit longer, to prevent
breaking existing code that uses them.
Related to #10697.
Reviewers: austin, goldfire, RyanGlScott, bgamari
Reviewed By: RyanGlScott, bgamari
Differential Revision: https://phabricator.haskell.org/D1761
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This aids with debugging, since all you have to do to get more
stack frames is add a constraint `(?callStack :: CallStack) =>`.
Old output:
```
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 8.1.20160107 for x86_64-unknown-linux):
ASSERT failed!
file compiler/types/TyCoRep.hs line 1800
InScope []
[Xuv :-> n_av5[sk]]
[]
```
New output:
```
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 8.1.20160107 for x86_64-unknown-linux):
ASSERT failed!
CallStack (from ImplicitParams):
assertPprPanic, called at compiler/types/TyCoRep.hs:1800:95 in
ghc:TyCoRep
InScope []
[Xuv :-> n_av5[sk]]
[]
```
Test Plan:
harbormaster
manual testing
Reviewers: austin, gridaphobe, bgamari
Reviewed By: gridaphobe, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1751
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Moves getIdValFromApStack to the server, and removes one use of wormhole.
Test Plan: validate
Reviewers: bgamari, niteria, austin, hvr, erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1768
GHC Trac Issues: #11100
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
So that assertion failures have full call stack information attached
when using `ghc -fexternal-interpreter -prof`. Here's one I just
collected by inserting a dummy assert in Happy:
```
*** Exception: Assertion failed
CallStack (from ImplicitParams):
assert, called at ./First.lhs:37:11 in main:First
CallStack (from -prof):
First.mkFirst (First.lhs:37:11-27)
First.mkFirst (First.lhs:37:11-93)
Main.main2.runParserGen.first (Main.lhs:107:48-56)
Main.main2.runParserGen.first (Main.lhs:107:27-57)
Main.main2.runParserGen (Main.lhs:(96,9)-(276,9))
Main.main2.runParserGen (Main.lhs:(90,9)-(276,10))
Main.main2.runParserGen (Main.lhs:(86,9)-(276,10))
Main.main2.runParserGen (Main.lhs:(85,9)-(276,10))
Main.main2 (Main.lhs:74:20-43)
Main.main2 (Main.lhs:(64,9)-(78,61))
Main.main (Main.lhs:57:9-18)
```
Test Plan: validate
Reviewers: erikd, hvr, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1765
GHC Trac Issues: #11047
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Build on x86_64 and AArch64
Reviewers: hvr, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1759
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a step towards building a Linux to Windows cross-compiler.
Test Plan: Build on Linux and Windows
Reviewers: bgamari, hvr, austin, Phyx
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1758
GHC Trac Issues: #10070
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously injective type families were part of TypeFamilies.
Now they are in a separate language extension.
Test Plan: ./validate
Reviewers: austin, bgamari, goldfire
Reviewed By: bgamari
Subscribers: goldfire, thomie
Differential Revision: https://phabricator.haskell.org/D1750
GHC Trac Issues: #11381
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: ./validate
Reviewers: goldfire, austin, bgamari
Subscribers: goldfire, osa1, thomie
Differential Revision: https://phabricator.haskell.org/D1114
GHC Trac Issues: #10603
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Rule numbers tend to go out-of-date, and aren't useful.
And during validate, the actual number of shift/reduce
conflicts is now checked against the number stated in Parser.y.
Reviewed by: bgamari
Differential Revision: https://phabricator.haskell.org/D1754
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now GHCi rejects input containing an import declaration and semicolon,
and prints an appropriate error message. Before, the stuff after an
import declaration and semicolon got ignored (most of the time), without
telling the user about it. As the default behaviour of GHCi is to reject
multiple commands in a single input, we extend this behaviour to import
commands.
This patch fixes #10663.
(See https://phabricator.haskell.org/D1518 for the introduction of
`is_import` and `is_decl`.)
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1726
GHC Trac Issues: #10663
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
And GHCi commands. This makes cross-referencing much easier.
Also normalize markup a bit and add some missing flags.
|
|
|
|
|
|
|
|
| |
See c8c44fd91b509b9eb644c826497ed5268e89363a.
Reviewed By: thomie, bgamari
Differential Revision: https://phabricator.haskell.org/D1745
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some parts of the build system require that paths are what msys2 calls
"mixed style":
* forwards slashes
* absolute paths starting with a drive letter followed by a colon
(e.g. "C:")
The removal of ghc-pwd in 4c56ad3 changed $(TOP) from mixed style to
unix style, resulting in a broken Windows build for some.
Differential Revision: https://phabricator.haskell.org/D1752
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was non-obvious to me when reading the sources and the
paper provides the motivation and explores the design space.
Test Plan: just a comment
Reviewers: simonpj, austin, ezyang, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1749
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Was broken by ce1f1607ed7f8fedd2f63c8610cafefd59baaf32. I've added a
test so that hopefully it won't break again.
Test Plan: validate & new test case
Reviewers: bgamari, austin, erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1746
GHC Trac Issues: #11304
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Speed up GHC.Event.IntTable.lookup by removing the IO context from the
go helper function. This generates a little bit better code as we can
avoid repeating the stack check.
Remove unused parameter from GHC.Event.IntTable.updateWith.go and
directly return a bool instead of a maybe and then checking that whether
it is a Nothing.
Test Plan: validate
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1742
GHC Trac Issues: #8793
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the second (and hopefully last) fix needed to make TH handle
GADTs properly (after D1465). This Diff addresses some issues with infix
GADT constructors, specifically:
* Before, you could not determine if a GADT constructor was declared
infix because TH did not give you the ability to determine if there is
a //user-specified// fixity declaration for that constructor. The
return type of `reifyFixity` was changed to `Maybe Fixity` so that it
yields `Just` the fixity is there is a fixity declaration, and
`Nothing` otherwise (indicating it has `defaultFixity`).
* `DsMeta`/`Convert` were changed so that infix GADT constructors are
turned into `GadtC`, not `InfixC` (which should be reserved for
Haskell98 datatype declarations).
* Some minor fixes to the TH pretty-printer so that infix GADT
constructors will be parenthesized in GADT signatures.
Fixes #11345.
Test Plan: ./validate
Reviewers: goldfire, austin, bgamari, jstolarek
Reviewed By: jstolarek
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1744
GHC Trac Issues: #11345
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This completes the support for TH with -fexternal-interpreter.
Test Plan: validate
Reviewers: bgamari, ezyang, austin, niteria, goldfire, erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1748
GHC Trac Issues: #11100
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The main goal here is enable stack traces in GHCi. After this change,
if you start GHCi like this:
ghci -fexternal-interpreter -prof
(which requires packages to be built for profiling, but not GHC
itself) then the interpreter manages cost-centre stacks during
execution and can produce a stack trace on request. Call locations
are available for all interpreted code, and any compiled code that was
built with the `-fprof-auto` familiy of flags.
There are a couple of ways to get a stack trace:
* `error`/`undefined` automatically get one attached
* `Debug.Trace.traceStack` can be used anywhere, and prints the current
stack
Because the interpreter is running in a separate process, only the
interpreted code is running in profiled mode and the compiler itself
isn't slowed down by profiling.
The GHCi debugger still doesn't work with -fexternal-interpreter,
although this patch gets it a step closer. Most of the functionality
of breakpoints is implemented, but the runtime value introspection is
still not supported.
Along the way I also did some refactoring and added type arguments to
the various remote pointer types in `GHCi.RemotePtr`, so there's
better type safety and documentation in the bridge code between GHC
and ghc-iserv.
Test Plan: validate
Reviewers: bgamari, ezyang, austin, hvr, goldfire, erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1747
GHC Trac Issues: #11047, #11100
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As Trac #11222, and #10712 note, the strictness analyser
needs to be rather careful about exceptions. Previously
it treated them as identical to divergence, but that
won't quite do.
See Note [Exceptions and strictness] in Demand, which
explains the deal.
Getting more strictness in 'catch' and friends is a
very good thing. Here is the nofib summary, keeping
only the big ones.
--------------------------------------------------------------------------------
Program Size Allocs Runtime Elapsed TotalMem
--------------------------------------------------------------------------------
fasta -0.1% -6.9% -3.0% -3.0% +0.0%
hpg -0.1% -2.0% -6.2% -6.2% +0.0%
maillist -0.1% -0.3% 0.08 0.09 +1.2%
reverse-complem -0.1% -10.9% -6.0% -5.9% +0.0%
sphere -0.1% -4.3% 0.08 0.08 +0.0%
x2n1 -0.1% -0.0% 0.00 0.00 +0.0%
--------------------------------------------------------------------------------
Min -0.2% -10.9% -17.4% -17.3% +0.0%
Max -0.0% +0.0% +4.3% +4.4% +1.2%
Geometric Mean -0.1% -0.3% -2.9% -3.0% +0.0%
On the way I did quite a bit of refactoring in Demand.hs
|