| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Co-authored-by: Rinat Stryungis <rinat.stryungis@serokell.io>
Implement GHC Proposal #387
* Parse char literals 'x' at the type level
* New built-in type families CmpChar, ConsSymbol, UnconsSymbol
* New KnownChar class (cf. KnownSymbol and KnownNat)
* New SomeChar type (cf. SomeSymbol and SomeNat)
* CharTyLit support in template-haskell
Updated submodules: binary, haddock.
Metric Decrease:
T5205
haddock.base
Metric Increase:
Naperian
T13035
|
|
|
|
|
|
| |
These instances are useful so that a `GenClosure` form `ghc-heap` can be
used as a key in a `Map`. Therefore the order itself is not important
but just the fact that there is one.
|
|
|
|
|
|
|
|
|
|
| |
Previously tc_eq_type would allocate a number of closures due to the two
boolean "mode" flags, despite the fact that these were always statically
known.
To avoid this we force tc_eq_type to inline into its call sites,
allowing the simplifier to eliminate both some runtime branches and the
closure allocations.
|
|
|
|
|
| |
This commit introduces a DecoratedSDoc type which replaces the old
ErrDoc, and hopefully better reflects the intent.
|
|
|
|
| |
Updates Haddock submodule
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit boldly removes the ErrDoc and the MsgDoc from the codebase.
The former was introduced with the only purpose of classifying errors
according to their importance, but a similar result can be obtained just
by having a simple [SDoc], and placing bullets after each of them.
On top of that I have taken the perhaps controversial decision to also
banish MsgDoc, as it was merely a type alias over an SDoc and as such it wasn't
offering any extra type safety. Granted, it was perhaps making type
signatures slightly more "focused", but at the expense of cognitive
burden: if it's really just an SDoc, let's call it with its proper name.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After commit 55ef3bdc28681a22ceccf207707c49229f9b7559, running `./configure`
now generates a `driver/ghci/ghci-wrapper.cabal` file from
`driver/ghci/ghci-wrapper.cabal.in`, which pollutes the `git` tree:
```
$ git status
On branch master
Your branch is up to date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
driver/ghci/ghci-wrapper.cabal
nothing added to commit but untracked files present (use "git add" to track)
```
Since `driver/ghci/ghci-wrapper.cabal` is autogenerated, the sensible thing to
do is to add it to `.gitignore`. While I was in town, I also added the standard
`*.in` file disclaimer to `driver/ghci/ghci-wrapper.cabal.in`.
[ci skip]
|
|
|
|
|
|
|
|
|
| |
An accidental use of `tcSymbol` instead of `tcNat` in the `TypeLitNat` case of
`mkTypeLitFromString` meant that it was possible to unsafely equate `Nat` with
`Symbol`. A consequence of this is that you could write `unsafeCoerce`, as
observed in #19288. This is fixed easily enough, thankfully.
Fixes #19288.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add missing :since: for NondecreasingIndentation and OverlappingInstances
- Remove duplicated descriptions for Safe Haskell flags and
UndecidableInstances. Instead, the sections contain a link.
- compare-flags: Also check for options supported by ghci.
This uncovered two more that are not documented.
The flag -smp was removed.
- Formatting fixes
- Remove the warning about -XNoImplicitPrelude - it was written in 1996,
the extension is no longer dangerous.
- Fix misspelled :reverse: flags
Fixes #18958.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See T19264 for a tricky corner case when explicitly importing
GHC.Num.BigNat and another module. With -dynamic-too, the FinderCache
contains paths for non-dynamic interfaces so they must be loaded first,
which is usually the case, except for some interfaces loaded in the
backend (e.g. in CorePrep).
So we must run the backend for the non-dynamic way first for
-dynamic-too to work as it is but I broke this invariant in
c85f4928d4dbb2eb2cf906d08bfe7620d6f04ca5 by mistakenly making the
backend run for the dynamic way first.
|
|
|
|
|
|
| |
The motivation is given in Note [tcFamTyPats: zonking the result kind].
Fixes #19250 -- the fix is easy.
|
|
|
|
| |
Otherwise we end up with terminating \r characters on Windows.
|
|
|
|
|
| |
This wraps the existing GHCi wrapper script (driver/ghci/ghci.c) in a
cabal file and adds the package to Hadrian.
|
| |
|
|
|
|
|
|
| |
Following the example of `git`, as noted in #19030.
Fixes #19030.
|
|
|
|
|
|
|
|
| |
-fstg-lift-lams-rec-* and -fstg-lift-lams-non-rec-* were setting the same
field.
Fix manual: -fstg-lift-lams-non-rec-args is disabled by
-fstg-lift-lams-non-rec-args-any, there's no -fno-stg-lift-*.
|
|
|
|
|
|
|
|
|
|
| |
Provoked by #19074, this patch makes GHC.Core.PatSyn.PatSyn
immutable, by recording only the *Name* of the matcher and
builder rather than (as currently) the *Id*.
See Note [Keep Ids out of PatSyn] in GHC.Core.PatSyn.
Updates haddock submodule.
|
|
|
|
|
| |
It was checking the old path compiler/prelude/*, outdated with the new module
hierarchy. I added a sanity check to avoid this in the future.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SDoc string literals created for example with `text "xyz"` are converted
into `PtrString` (`Addr#` + size in bytes) with a rewrite rule to avoid
allocating a String.
Before this patch, the size in bytes was still computed at runtime. For
every literal, we obtained the following pseudo STG:
x :: Addr#
x = "xzy"#
s :: PtrString
s = \u [] case ffi:strlen [x realWorld#] of
(# _, sz #) -> PtrString [x sz]
But since GHC 9.0, we can use `cstringLength#` instead to get:
x :: Addr#
x = "xzy"#
s :: PtrString
s = PtrString! [x 3#]
Literals become statically known constructor applications. Allocations
seem to decrease a little in perf tests (between -0.1% and -0.7% on CI).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Related to a future change in Data.List,
https://downloads.haskell.org/ghc/8.10.3/docs/html/users_guide/using-warnings.html?highlight=wcompat#ghc-flag--Wcompat-unqualified-imports
Companion pull&merge requests:
- https://github.com/judah/haskeline/pull/153
- https://github.com/haskell/containers/pull/762
- https://gitlab.haskell.org/ghc/packages/hpc/-/merge_requests/9
After these the actual change in Data.List should be easy to do.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
StgLam is used exclusively in the work of CoreToStg, but there's nothing
in the type of StgExpr that indicates this, so we're forced throughout
the Stg.* codebase to handle cases like:
case expr of
...
StgLam lam -> panic "Unexpected StgLam"
...
This patch removes the StgLam constructor from the base StgExpr so these
cases no longer need to be handled. Instead, we use a new intermediate
type in CoreToStg, PreStgRhs, to represent the RHS expression of a
binding.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When -XStrict is enabled the rules for irrefutability are slightly modified.
Specifically, the pattern in a program like
do ~(Just hi) <- expr
cannot be considered irrefutable. The ~ here merely disables the bang that
-XStrict would usually apply, rendering the program equivalent to the following
without -XStrict
do Just hi <- expr
To achieve make this pattern irrefutable with -XStrict the user would rather
need to write
do ~(~(Just hi)) <- expr
Failing to account for this resulted in #19027. To fix this isIrrefutableHsPat
takes care to check for two the irrefutability of the inner pattern when it
encounters a LazyPat and -XStrict is enabled.
|
|
|
|
|
|
|
|
|
| |
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.
|