| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
The motivation is given in Note [tcFamTyPats: zonking the result kind].
Fixes #19250 -- the fix is easy.
|
|
|
|
|
|
|
|
|
| |
Metric Decrease:
T12545
T14683
T16577
T5321Fun
T5642
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to get this commit:
commit 0952d94a2e30a3e7cddbede811b15fa70f7b9462 (HEAD)
Author: Joachim Breitner <mail@joachim-breitner.de>
Date: Tue Jan 19 11:39:38 2021 +0100
Make haddock more robust to changes to the `Language` data type
With the introduction of GHC2021, the `Languages` data type in GHC will
grow. In preparation of that (and to avoid changing haddock with each
new language), this change makes the code handle extensions to that data
type gracefully.
(cherry picked from commit c341dd7c9c3fc5ebc83a2d577c5a726f3eb152a5)
This can go in as preparation for !4853
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This also means we compile GHC with -O1 instead of -O2 for some
platforms for CI. As a result a lot of test metrics
got worse which we now have to accept.
-------------------------
Metric Increase:
ManyAlternatives
ManyConstructors
MultiLayerModules
Naperian
T10421
T12150
T12227
T12234
T12425
T12545
T12707
T13035
T13253
T13253-spj
T13701
T13379
T13719
T14697
T16577
T18282
T18698a
T18698b
T1969
T3064
T3294
T4801
T5205
T5321FD
T5321Fun
T5631
T6048
T783
T9020
T9203
T9233
T9630
T9872a
T9872b
T9872c
T9872d
T9961
haddock.Cabal
haddock.base
haddock.compiler
parsing001
T5642
WWRec
T14683
T15164
T18304
T18923
-------------------------
|
|
|
|
|
| |
We compare it to n_gc_idle_threads which is unsigned as well.
So make both signed to avoid a warning.
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously, the configure script doesn't respect $AR. This causes the
nixpkgs GHC to capture "ar" instead of the absolute nix store path of ar
in the global config.
The original patch comes from
https://github.com/input-output-hk/haskell.nix/blob/master/overlays/patches/ghc/respect-ar-path.patch.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* disable idle GC which has a big impact on time measures
* use average measures (before and after event registration)
* use warmup measures (for some reason the first measure of a batch
seems to be often quite different from the others)
* drop the division by monotonic clock time: this clock is impacted by
the load of the runner. We only want to measure the time spent in the
RTS while the mutator is idle so I don't understand why it was used.
|
|
|
|
|
|
| |
By querying the PATH variable explicitly via `getSearchPath`, we can
work around the special behavior of `findExecutable` on Windows, where
it also searches in System32. Fixes #19249.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit also consolidates documentation in the user
manual around UndecidableSuperClasses, UndecidableInstances,
and FlexibleContexts.
Close #19186.
Close #19187.
Test case: typecheck/should_compile/T19186,
typecheck/should_fail/T19187{,a}
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `Applicative` instance is the most important one (for
array/vector/sequence indexing purposes), but it deserves
all the usual ones.
T12545 does silly 1% wibbles both ways, it seems, maybe depending
on architecture.
Metric Increase:
T12545
Metric Decrease:
T12545
|
|
|
|
|
|
| |
With this change, the type/kind of an object as well as it's category
and definition site are added to the output of the :doc command for each
object matching the argument string.
|
|
|
|
|
|
|
|
|
|
| |
It is confusing that it defaults to two different things depending on
whether we are in the profiling way or not.
Use -hc if you have a profiling build
Use -hT if you have a normal build
Fixes #19031
|
|
|
|
|
|
|
|
|
| |
They are not part of the IOManager interface used within the rest of the
RTS. They are the part of the interface of specific I/O manager
implementations.
They are no longer called directly elsewhere in the RTS, and are now
only called by the dispatch functions in IOManager.c
|
|
|
|
|
|
|
| |
Use in the scheduler in threaded mode.
Replaces the direct call to ioManagerWakeup which are part of specific
I/O manager implementations.
|
|
|
|
|
| |
The latter is the proper hook defined in IOManager.h. The former is part
of a specific I/O manager implementation (the threaded unix one).
|
|
|
|
|
|
|
|
|
|
| |
Replace a direct call to ioManagerStartCap in the forkProcess in
Schedule.c with a new hook initIOManagerAfterFork in IOManager.
This replaces a direct hook in the scheduler from the a single I/O
manager impl (the threaded unix one) with a generic hook.
Add some commentrary on opportunities for future rationalisation.
|
| |
|
|
|
|
|
|
|
|
| |
Move them from the external IOInterface.h to the internal IOManager.h.
The functions are all in fact internal. They are not used from the base
library at all.
Remove ioManagerWakeup as an exported symbol. It is not used elsewhere.
|
|
|
|
|
| |
This is a better home for it. It is not really an aspect of
capabilities. It is specific to one of the I/O manager impls.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is currently rather difficult to understand or work with the various
I/O manager implementations. This is for a few reasons:
1. They do not have a clear or common API. There are some common
function names, but a lot of things just get called directly.
2. They have hooks into many other parts of the RTS where they get
called from.
3. There is a _lot_ of CPP involved, both THREADED_RTS vs !THREADED_RTS
and also mingw32_HOST_OS vs !mingw32_HOST_OS. This doesn't really
identify the I/O manager implementation.
4. They have data structures with unclear ownership, or that are
co-owned with other components like the scheduler. Some data
structures are used by multiple I/O managers.
One thing that would help is if the interface between the I/O managers
and the rest of the RTS was clearer, even if it was not completely
uniform. Centralising it would make it easier to see how to reduce any
unnecessary diversity in the interfaces.
This patch makes a start by creating a new IOManager.{h,c} module. It is
initially empty, but we will move things into it in subsequent patches.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Naming is hard. Where we want to get to is to have a clear internal and
external API for the IO manager within the RTS. What we have right now
is just the external API (used in base for the Haskell side of the
threaded IO manager impls) living in includes/rts/IOManager.h.
We want to add a clear RTS internal API, which really ought to live in
rts/IOManager.h. Several people think it's too confusing to have both:
* includes/rts/IOManager.h for the external API
* rts/IOManager.h for the internal API
So the plan is to add rts/IOManager.{h,c} as the internal parts, and
rename the external part to be includes/rts/IOInterface.h.
It is admittidly not great to have .h files in includes/rts/ called
"interface" since by definition, every .h fle under includes/ is an
interface!
Alternative naming scheme suggestions welcome!
|
|
|
|
|
| |
It is only for MIO, and we want to use the generic name IOManager for
the name of the common parts of the interface and dispatch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From `Note [Speculative evaluation]`:
Since call-by-value is much cheaper than call-by-need, we case-bind
arguments that are either
1. Strictly evaluated anyway, according to the StrictSig of the
callee, or
2. ok-for-spec, according to 'exprOkForSpeculation'
While (1) is a no-brainer and always beneficial, (2) is a bit
more subtle, as the careful haddock for 'exprOkForSpeculation'
points out. Still, by case-binding the argument we don't need
to allocate a thunk for it, whose closure must be retained as
long as the callee might evaluate it. And if it is evaluated on
most code paths anyway, we get to turn the unknown eval in the
callee into a known call at the call site.
NoFib Results:
```
--------------------------------------------------------------------------------
Program Allocs Instrs
--------------------------------------------------------------------------------
ansi -9.4% -10.4%
maillist -0.1% -0.1%
paraffins -0.7% -0.5%
scc -0.0% +0.1%
treejoin -0.0% -0.1%
--------------------------------------------------------------------------------
Min -9.4% -10.4%
Max 0.0% +0.1%
Geometric Mean -0.1% -0.1%
```
Fixes #19224.
|
|
|
|
|
|
| |
Thery is still, in my view, far too numerous, but I believe this won't
be too hard to improve upon. At the very lease, we can always add more
extension points!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
----------------
What:
There are two splits.
The first spit is:
- `Language.Haskell.Syntax.Extension`
- `GHC.Hs.Extension`
where the former now just contains helpers like `NoExtCon` and all the
families, and the latter is everything having to do with `GhcPass`.
The second split is:
- `Language.Haskell.Syntax.<mod>`
- `GHC.Hs.<mod>`
Where the former contains all the data definitions, and the few helpers
that don't use `GhcPass`, and the latter contains everything else. The
second modules also reexport the former.
----------------
Why:
See the issue for more details, but in short answer is we're trying to
grasp at the modularity TTG is supposed to offer, after a long time of
mainly just getting the safety benefits of more complete pattern
matching on the AST.
Now, we have an AST datatype which, without `GhcPass` is decently
stripped of GHC-specific concerns. Whereas before, not was it
GHC-specific, it was aware of all the GHC phases despite the
parameterization, with the instances and parametric data structure
side-by-side.
For what it's worth there are also some smaller, imminent benefits:
- The latter change also splits a strongly connected component in two,
since none of the `Language.Haskell.Syntax.*` modules import the older
ones.
- A few TTG violations (Using GhcPass directly in the AST) in `Expr` are
now more explicitly accounted for with new type families to provide the
necessary indirection.
-----------------
Future work:
- I don't see why all the type families should live in
`Language.Haskell.Syntax.Extension`. That seems anti-modular for
little benefit. All the ones used just once can be moved next to the
AST type they serve as an extension point for.
- Decide what to do with the `Outputable` instances. Some of these are
no orphans because they referred to `GhcPass`, and had to be moved. I
think the types could be generalized so they don't refer to `GhcPass`
and therefore can be moved back, but having gotten flak for increasing
the size and complexity types when generalizing before, I did *not*
want to do this.
- We should triage the remaining contents of `GHC.Hs.<mod>`. The
renaming helpers are somewhat odd for needing `GhcPass`. We might
consider if they are a) in fact only needed by one phase b) can be
generalized to be non-GhcPass-specific (e.g. take a callback rather
than GADT-match with `IsPass`) and then they can live in
`Language.Haskell.Syntax.<mod>`.
For more details, see
https://gitlab.haskell.org/ghc/ghc/-/wikis/implementing-trees-that-grow
Bumps Haddock submodule
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement constant folding rules for Natural (similar to Integer ones)
* Add mkCoreUbxSum helper in GHC.Core.Make
* Remove naturalTo/FromInt
We now only provide `naturalTo/FromWord` as
the semantics is clear (truncate/zero-extend). For Int we have to deal
with negative numbers (throw an exception? convert to Word
beforehand?) so we leave the decision about what to do to the caller.
Moreover, now that we have sized types (Int8#, Int16#, ..., Word8#,
etc.) there is no reason to bless `Int#` more than `Int8#` or `Word8#`
(for example).
* Replaced a few `()` with `(# #)`
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This has two fixes:
1. Take TyVarTvs into account in matchableGivens. This
fixes #19106.
2. Don't allow unifying alpha ~ Maybe alpha. This fixes
#19107.
This patch also removes a redundant Note and redirects
references to a better replacement.
Also some refactoring/improvements around the BindFun
in the pure unifier, which now can take the RHS type
into account.
Close #19106.
Close #19107.
Test case: partial-sigs/should_compile/T19106,
typecheck/should_compile/T19107
|
|
|
|
|
| |
The validate flavour is already defined and used in hadrian, so this
legacy comment should be removed.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nested TransCo were printed with a lot of indentation, e.g.:
`cast` (Sub (Sym (Foo.D:R:Index[0] <Bool>_N <'[]>_N)) ; ((Index
(Sym (SubDef (<1>_N,
<1>_N)))
<'[Bool]>_N)_R ; ...
With this patch we print them as follows:
`cast` (Sub (Sym (Foo.D:R:Index[0] <Bool>_N <'[]>_N))
; (Index (Sym (SubDef (<1>_N, <1>_N))) <'[Bool]>_N)_R
; Sub (Sym (Foo.D:R:Index[1] <1>_N <Int>_N <'[Bool]>_N))
; (Index (Sym (SubDef (<2>_N, <1>_N))) <'[Int, Bool]>_N)_R
|
|
|
|
|
|
|
|
|
| |
- All rts_mk functions return the tagged closure address
- rts_mkChar/rts_mkInt avoid allocation when the argument is within the
CHARLIKE/INTLIKE range
- rts_getBool avoids a memory load by checking the closure tag
- In rts_mkInt64/rts_mkWord64, allocated closure payload size is either
1 or 2 words depending on target architecture word size
|
|
|
|
|
| |
For big-endian machines remove the byte swap in the non-recursive call
of goSubWord since the integer is already in proper format.
|
| |
|
|
|
|
|
|
| |
Previously we would inexplicably append the key to id_rsa.
Fixes #19225.
|
|
|
|
|
| |
Ensure that shift amount parameter has the same type as the parameter to
shift.
|
|
|
|
|
|
| |
Alt, AnnAlt and IfaceAlt were using triples. This patch makes them use
dedicated types so that we can try to make some fields strict (for
example) in the future.
|