| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After I have found out that I should look at -ddump-prep and not
-ddump-core, I noticed that these days, GHC is perfectly capeable of
turning (the equivalent) of foldl to (the equivalent) of foldl' if the
operation in question is strict. So instead of using rewrite rules to
rewrite maximum to a strictMaximum for certain types, we simply use
SPECIALIZE.
This also marks maximum/minimum as INLINEABLE, so that client code can
get similar specializations, hopefully even automatically. And inded,
minimum applied to [Double] produces good code (although due to
inlineing, not due to specialization, it seems).
I checked (by looking at the core) that this still fixes #10788.
Differential revision: https://phabricator.haskell.org/D1229
|
|
|
|
|
|
|
|
| |
This fixes a regression reported in #10788, where due to less inlining
compared to earlier versions, we’d get worse code. With the SPECIALIZE,
we get the good code, and moreover, the good code is in List.hs and
_not_ inlined to the use site, so smaller code size and less compilation
time.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There used to be a lot of custom make code to build ghc-pkg with the
stage0 compiler. Commit ac5a314504554ddef0e855ef9e2fcf51e961f4a6
thankfully cleaned this up, by using the build settings from the
ghc-pkg.cabal file.
This commit removes some remains of the old way of installing ghc-pkg
when Stage1Only=YES. Notably, we called both `build-prog` as
`shell-wrapper`. This is surely wrong, because `build-prog` already
calls `shell-wrapper`. It isn't needed to set WANT_INSTALLED_WRAPPER
either; build-prog does that for us.
This prevents the following warnings when Stage1Only=YES:
utils/ghc-pkg/ghc.mk:46: warning:
overriding commands for target `install_utils/ghc-pkg_dist_wrapper'
utils/ghc-pkg/ghc.mk:37: warning:
ignoring old commands for target `install_utils/ghc-pkg_dist_wrapper'
Also add more comments and restructure a bit.
Reviewed by: austin
Differential Revision: https://phabricator.haskell.org/D1063
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note that SRC_HC_OPTS are added to every Haskell compilation. So
there isn't any need to also add `-fllvm` to GhcStage1HcOpts,
GhcStage2HcOpts and GhcLibHcOpts.
Small bug fix: make sure we test for -fllvm in SRC_HC_OPTS, to check
whether the bootstrap compiler is affected by bug #9439.
Reviewed by: austin
Differential Revision: https://phabricator.haskell.org/D1188
|
|
|
|
|
|
|
|
|
| |
This allows easier diffing of different BuildFlavours, including
`mk/flavours/validate.mk`.
Reviewed By: bgamari, austin
Differential Revision: https://phabricator.haskell.org/D1050
|
|
|
|
|
| |
This has been unnecessary for quite some time due to the create/delete
capability events.
|
| |
|
|
|
|
| |
Otherwise this is ill-formed DocBook
|
|
|
|
|
|
|
| |
Lines like the following are filling up the build logs:
binary-0.7.5.0: cannot find any of
["Data/Binary.hi","Data/Binary.p_hi","Data/Binary.dyn_hi"] (ignoring)
|
|
|
|
|
|
| |
Reviewed by: bgamari
Differential Revision: https://phabricator.haskell.org/D1209
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Previously, foldr1 would be defiend recursively and thus not inline.
This is bad, for example, when maximumBy has a strict comparison
function: Before the BBP, it was implemented via foldl1, which inlined
and yielded good code. With BBP, it goes via foldr1, so we better inline
this as well. Fixes #10830.
Differential Revision: https://phabricator.haskell.org/D1205
|
|
|
|
| |
Differential Revision: https://phabricator.haskell.org/D1206
|
|
|
|
| |
Differential Revision: https://phabricator.haskell.org/D1207
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes validate.
374457809de343f409fbeea0a885877947a133a2 (D202) mentions: "This patch
also wires-in Maybe data type".
A conflicting definition of a wired-in type in a .hsig file doesn't seem
to cause compilation to fail. This is probably a bug, but a small one.
Since SPJ in ffc21506894c7887d3620423aaf86bc6113a1071 swept this under
the rug, by removing `data Bool a b c d = False` from tcfail220.hsig,
I'm going to do the same here.
D1098 touches these files, so ezyang can decide whether this problem
warrants fixing when doing a rebase.
Differential Revision: https://phabricator.haskell.org/D1208
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For details see #6018, Phab:D202 and the wiki page:
https://ghc.haskell.org/trac/ghc/wiki/InjectiveTypeFamilies
This patch also wires-in Maybe data type and updates haddock submodule.
Test Plan: ./validate
Reviewers: simonpj, goldfire, austin, bgamari
Subscribers: mpickering, bgamari, alanz, thomie, goldfire, simonmar,
carter
Differential Revision: https://phabricator.haskell.org/D202
GHC Trac Issues: #6018
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`make test` now runs all tests for a single way only. Use `make slowtest` to
get the previous behaviour (i.e. run all tests for all ways).
The intention is to use this new `make test` setting for Phabricator, as
a reasonable compromise between `make fasttest` (what it previously
used) and a fullblown `make slowtest` (which runs all tests for all
ways).
See Note [validate and testsuite speed] in toplevel Makefile.
Differential Revision: https://phabricator.haskell.org/D1178
|
|
|
|
|
|
|
|
|
|
| |
I didn't realize that `./validate` does not run every test :(
Test Plan: ./validate --slow
Update submodule hpc.
Differential Revision: https://phabricator.haskell.org/D1204
|
|
|
|
| |
Please revert when #10712 is fixed.
|
| |
|
|
|
|
|
|
|
|
|
| |
They can only occur with `-O`, but we want tests to produce the same
output for all test ways.
This brings us closer to passing the complete testsuite.
Differential Revision: https://phabricator.haskell.org/D1203
|
|
|
|
| |
Updates stm submodule.
|
|
|
|
|
|
|
|
|
|
| |
Summary: See Note [Displaying potential instances].
Reviewers: austin
Subscribers: KaneTW, thomie
Differential Revision: https://phabricator.haskell.org/D1176
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Declaration QuasiQuoters do not cause a group split like $(...)
splices, and are run and expanded before other declarations in
the group.
Resolves the lingering issue with #10047, and fixes broken tests
qq007 and qq008.
Test Plan: validate
Reviewers: goldfire, austin, bgamari
Reviewed By: bgamari
Subscribers: goldfire, simonpj, thomie, spinda
Differential Revision: https://phabricator.haskell.org/D1199
GHC Trac Issues: #10047
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
addTopDecls restricts what declarations it can be used to add. Adding
annotations via this method works fine with no special changes apart
from adding AnnD to the declaration whitelist.
Test Plan: validate
Reviewers: austin, goldfire, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1201
GHC Trac Issues: #10486
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Windows, we're constrained to 32k bytes total for command line
arguments. When building large projects, this limit can be exceeded.
This patch changes GHC to always use response files for linker
arguments, a feature first used by Microsoft compilers and added to GCC
(over a decade ago).
Alternatives here include:
* Only use this method on Windows systems
* Check the length of the command line arguments and use that to decide
whether to use this method
I did not pursue either of these, as I believe it would make the patch
more likely to break in less tested situations.
Test Plan:
Confirm that linking still works in general. Ideally: compile a very
large project on Windows with this patch. (I am attempting to do that
myself now, but having trouble getting the Windows build tool chain up
and running.)
Reviewers: goldfire, hvr, rwbarton, austin, thomie, bgamari, Phyx
Reviewed By: thomie, bgamari, Phyx
Subscribers: erikd, awson, #ghc_windows_task_force, thomie
Differential Revision: https://phabricator.haskell.org/D1158
GHC Trac Issues: #8596, #10777
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: ./validate
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1193
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate.
Reviewers: austin, tibbe, bgamari
Reviewed By: tibbe, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1194
GHC Trac Issues: #10413
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch modifies `error`, `undefined`, and `assertError` to use
implicit call-stacks to provide better error messages to users.
There are a few knock-on effects:
- `GHC.Classes.IP` is now wired-in so it can be used in the wired-in
types for `error` and `undefined`.
- `TysPrim.tyVarList` has been replaced with a new function
`TysPrim.mkTemplateTyVars`. `tyVarList` made it easy to introduce
subtle bugs when you need tyvars of different kinds. The naive
```
tv1 = head $ tyVarList kind1
tv2 = head $ tyVarList kind2
```
would result in `tv1` and `tv2` sharing a `Unique`, thus substitutions
would be applied incorrectly, treating `tv1` and `tv2` as the same
tyvar. `mkTemplateTyVars` avoids this pitfall by taking a list of kinds
and producing a single tyvar of each kind.
- The types `GHC.SrcLoc.SrcLoc` and `GHC.Stack.CallStack` now live in
ghc-prim.
- The type `GHC.Exception.ErrorCall` has a new constructor
`ErrorCallWithLocation` that takes two `String`s instead of one, the
2nd one being arbitrary metadata about the error (but usually the
call-stack). A bi-directional pattern synonym `ErrorCall` continues to
provide the old API.
Updates Cabal, array, and haddock submodules.
Reviewers: nh2, goldfire, simonpj, hvr, rwbarton, austin, bgamari
Reviewed By: simonpj
Subscribers: rwbarton, rodlogic, goldfire, maoe, simonmar, carter,
liyang, bgamari, thomie
Differential Revision: https://phabricator.haskell.org/D861
GHC Trac Issues: #5273
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rename `platform_wordsize_qualify` to `find_expected_file`, and make
it return a filename instead of an (absolute) filepath.
* Replace most usages of `qualify` by `in_testdir`. Others usage sites
will be deleted in a later commit.
These changes will be useful in a later commit, when we'll distinguish
between files in the source directory and those in a (newly created)
test directory.
Reviewed by: austin, bgamari
Differential Revision: https://phabricator.haskell.org/D1186
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This is very similar to D1073. It makes type family instances to be
attached to a binding with a least `OccName`, therefore not depending on `Unique` ordering.
Test Plan:
* this makes `Language.Haskell.Exts.SrcLoc` deterministic
* ./validate
Reviewers: simonmar, austin, bgamari, simonpj
Reviewed By: simonpj
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1192
GHC Trac Issues: #4012
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`MkT` is the name of the constructor whilst `T` is the name of
the type.
Reviewers: bgamari, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1191
GHC Trac Issues: #10787
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1190
|
|
|
|
|
|
|
| |
This should at least help alleviate the annoyance of #4505. This
reintroduces a compile-time check originally added in
a278f3f02d09bc32b0a75d4a04d710090cde250f but dropped with the new code
generator.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a somewhat minor optimisation exploiting the static knowledge
of the operands involved allowing to save a few allocations.
Reviewers: austin, rwbarton, goldfire, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1179
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: simonmar, bgamari, austin
Reviewed By: bgamari, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1177
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now identifiers can start with a package key, which is a hash, so they
may also start with a digit. Identifiers always appear at the beginning
of a line, and numbers never appear here, soit's safe to allow
identifiers to start with a digit.
Test Plan: `concprog002` passes under `threaded2_hT` way
Reviewers: austin, bgamari, thomie
Reviewed By: austin, bgamari, thomie
Differential Revision: https://phabricator.haskell.org/D1175
GHC Trac Issues: #10661
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Check with `readelf --debug-dump=ranges`
Reviewers: scpmw, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1174
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some libraries (e.g. elfutils) need these otherwise they ignore our
DWARF annotations.
Test Plan: Test with elfutils' `readelf --debug-dump=cu_index`
Reviewers: scpmw, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1173
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously this was given in the body but not in the abbreviation table.
Who knows what sort of havoc this was wrecking.
Test Plan: Verify against DWARF4 specification
Reviewers: scpmw, austin
Subscribers: Tarrasch, thomie
Differential Revision: https://phabricator.haskell.org/D1172
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only supports UTF-8 as a value right now. I expect some discussion to go
on around the naming of this variable and whether it's valid to backport
it to GHC 7.10 (which would be my preference). The motivation here is
that, when capturing the output of GHC to a file, we often want to
ensure that the output is UTF-8, regardless of the actual character
encoding of the terminal/console.
On the other hand, we don't want to necessary change the
terminal/console encoding. The reason being:
* On Windows, this requires a global-esque change to the console
codepage, which adversely affects other processes in the same console
* On all OSes, this can break features like smart quote auto-detection.
Test Plan:
Set LANG to C, GHC_CHARENC to UTF-8, and compile a Haskell source
file with a non-ASCII warning produced. The output who include the UTF-8
sequence instead of replacing it with ?.
Reviewers: austin, rwbarton, bgamari
Reviewed By: bgamari
Subscribers: hsyl20, thomie
Differential Revision: https://phabricator.haskell.org/D1167
GHC Trac Issues: #10762
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This amounts to enabling PolyKinds in GHC.Generics. However, explicit
kind signatures must be applied to the datatypes and typeclasses in
GHC.Generics to ensure that the Core which TcGenGenerics generates
is properly kinded.
Several of the typeclasses in GHC.Generics could be poly-kinded, but
this differential does not attempt to address this, since D493 already
addresses this.
Test Plan: ./validate
Reviewers: hvr, austin, dreixel, bgamari
Reviewed By: austin, dreixel, bgamari
Subscribers: goldfire, thomie
Differential Revision: https://phabricator.haskell.org/D1166
GHC Trac Issues: #10775
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 0d1a8d09f4 added a two step allocator for 64 bit systems. This
allocator mmaps a huge (1 TB) chunk of memory out of which it does
smaller allocations. On AArch64/Arm64 linux, this mmap was failing
due to the Arm64 Linux kernel parameter CONFIG_ARM64_VA_BITS
defaulting to 39 bits.
Therefore reducing the AArch64 value for MBLOCK_SPACE_SIZE to make
this allocation 1/4 TB while remaining 1 TB for other archs.
Reviewers: ezyang, austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1171
GHC Trac Issues: #10682
|
| |
|
| |
|
|
|
|
|
| |
Currently we don't persist these three "advisory" IdInfos through
interface files. We easily could if needed.
|