| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Conversion from Addr# to I# isn't correct with the JS backend.
Also used the opportunity to reenable 64-bit Word/Int tests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch moves the field-based logic for disambiguating record updates
to the renamer. The type-directed logic, scheduled for removal, remains
in the typechecker.
To do this properly (and fix the myriad of bugs surrounding the treatment
of duplicate record fields), we took the following main steps:
1. Create GREInfo, a renamer-level equivalent to TyThing which stores
information pertinent to the renamer.
This allows us to uniformly treat imported and local Names in the
renamer, as described in Note [GREInfo].
2. Remove GreName. Instead of a GlobalRdrElt storing GreNames, which
distinguished between normal names and field names, we now store
simple Names in GlobalRdrElt, along with the new GREInfo information
which allows us to recover the FieldLabel for record fields.
3. Add namespacing for record fields, within the OccNames themselves.
This allows us to remove the mangling of duplicate field selectors.
This change ensures we don't print mangled names to the user in
error messages, and allows us to handle duplicate record fields
in Template Haskell.
4. Move record disambiguation to the renamer, and operate on the
level of data constructors instead, to handle #21443.
The error message text for ambiguous record updates has also been
changed to reflect that type-directed disambiguation is on the way
out.
(3) means that OccEnv is now a bit more complex: we first key on the
textual name, which gives an inner map keyed on NameSpace:
OccEnv a ~ FastStringEnv (UniqFM NameSpace a)
Note that this change, along with (2), both increase the memory residency
of GlobalRdrEnv = OccEnv [GlobalRdrElt], which causes a few tests to
regress somewhat in compile-time allocation.
Even though (3) simplified a lot of code (in particular the treatment of
field selectors within Template Haskell and in error messages), it came
with one important wrinkle: in the situation of
-- M.hs-boot
module M where { data A; foo :: A -> Int }
-- M.hs
module M where { data A = MkA { foo :: Int } }
we have that M.hs-boot exports a variable foo, which is supposed to match
with the record field foo that M exports. To solve this issue, we add a
new impedance-matching binding to M
foo{var} = foo{fld}
This mimics the logic that existed already for impedance-binding DFunIds,
but getting it right was a bit tricky.
See Note [Record field impedance matching] in GHC.Tc.Module.
We also needed to be careful to avoid introducing space leaks in GHCi.
So we dehydrate the GlobalRdrEnv before storing it anywhere, e.g. in
ModIface. This means stubbing out all the GREInfo fields, with the
function forceGlobalRdrEnv.
When we read it back in, we rehydrate with rehydrateGlobalRdrEnv.
This robustly avoids any space leaks caused by retaining old type
environments.
Fixes #13352 #14848 #17381 #17551 #19664 #21443 #21444 #21720 #21898 #21946 #21959 #22125 #22160 #23010 #23062 #23063
Updates haddock submodule
-------------------------
Metric Increase:
MultiComponentModules
MultiLayerModules
MultiLayerModulesDefsGhci
MultiLayerModulesNoCode
T13701
T14697
hard_hole_fits
-------------------------
|
|
|
|
|
| |
This implements
[CLC proposal #149](https://github.com/haskell/core-libraries-committee/issues/149).
|
|
|
|
|
|
|
|
|
| |
Derived `Data` instances use raw infix constructor names when applicable.
The `Data.Data [a]` instance, if derived, would have a constructor name
of `":"`. However, it actually uses constructor name `"(:)"`. Document this
peculiarity.
See https://github.com/haskell/core-libraries-committee/issues/147
|
|
|
|
|
|
|
|
|
|
| |
* The documentation for `atomicModifyIORef` and `atomicModifyIORef'`
were incomplete, and the documentation for `atomicModifyIORef` was
out of date. Update and expand.
* Remove a useless lazy pattern match in the definition of
`atomicModifyIORef`. The pair it claims to match lazily
was already forced by `atomicModifyIORef2`.
|
|
|
|
| |
This implements [CLC proposal #148](https://github.com/haskell/core-libraries-committee/issues/148).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For a long time, `GHC.Conc.Sync` has said
```haskell
-- ToDo: data ThreadId = ThreadId (Weak ThreadId#)
-- But since ThreadId# is unlifted, the Weak type must use open
-- type variables.
```
We are now actually capable of using `Weak# ThreadId#`, but the
world has moved on. To support the `Show` and `Ord` instances, we'd
need to store the thread ID number in the `ThreadId`. And it seems
very difficult to continue to support `threadStatus` in that regime,
since it needs to be able to explain how threads died. In addition,
garbage collection of weak references can be quite expensive, and it
would be hard to evaluate the cost over he whole ecosystem. As discussed
in
[this CLC issue](https://github.com/haskell/core-libraries-committee/issues/125),
it doesn't seem very likely that we'll actually switch to weak
references here.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Explicitly define length, elem, etc. in Foldable instance for Data.Functor.Compose
Implementation of https://github.com/haskell/core-libraries-committee/issues/57
|
|
|
|
| |
Fixes #23128
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements a part of GHC Proposal #475.
The key change is in GHC.Tuple.Prim:
- data () = ()
- data (a,b) = (a,b)
- data (a,b,c) = (a,b,c)
...
+ data Unit = ()
+ data Tuple2 a b = (a,b)
+ data Tuple3 a b c = (a,b,c)
...
And the rest of the patch makes sure that Unit and Tuple<n>
are pretty-printed as () and (,,...,,) in various contexts.
Updates the haddock submodule.
Co-authored-by: Vladislav Zavialov <vlad.z.4096@gmail.com>
|
| |
|
|
|
|
| |
Updates Win32 submodule
|
| |
|
| |
|
|
|
|
|
|
| |
This function is currently present in `Data.List.NonEmpty`, but `Data.Functor`
is a better home for it. This change was discussed and approved by the CLC
at https://github.com/haskell/core-libraries-committee/issues/88.
|
| |
|
|
|
|
|
|
| |
These all type-level equality decision procedures.
Implementes a CLC proposal https://github.com/haskell/core-libraries-committee/issues/98
|
| |
|
|
|
|
|
|
|
| |
Proposed in
[CLC proposal #113](https://github.com/haskell/core-libraries-committee/issues/113)
and
[approved by the CLC](https://github.com/haskell/core-libraries-committee/issues/113#issuecomment-1452452191)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts the bits affecting fusion of `drop` and `dropWhile` of commit
0f7588b5df1fc7a58d8202761bf1501447e48914 and keeps just the small refactoring
unifying `flipSeqTake` and `flipSeqScanl'` into `flipSeq`.
It also adds a new test for #23021 (which was the reason for reverting) as
well as adds a clarifying comment to T18964.
Fixes #23021, unfixes #18964.
Metric Increase:
T18964
Metric Decrease:
T18964
|
|
|
|
|
|
|
| |
hs_cmpxchg64 must return a StgWord64, otherwise incorrect runtime
results of 64-bit MO_Cmpxchg will appear in 32-bit unregisterised
builds, which go unnoticed at compile-time due to C implicit casting
in .hc files.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #22708
|
|
|
|
|
|
|
|
|
| |
This patch changes the pointer-equality comparison operations in
GHC.Prim.PtrEq to work with arrays of unlifted values, e.g.
sameArray# :: forall {l} (a :: TYPE (BoxedRep l)). Array# a -> Array# a -> Int#
Fixes #22976
|
| |
|
|
|
|
|
|
|
|
|
|
| |
`libiserv` serves no purpose. As it depends on `ghci` and doesn't have
more dependencies than the `ghci` package, its code could live in the
`ghci` package too.
This commit also moves most of the code from the `iserv` program into
the `ghci` package as well so that it can be reused. This is especially
useful for the implementation of TH for the JS backend (#22261, !9779).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These functions are
* recursive
* overloaded
So it's important to add an `INLINABLE` pragma to each so that they can be
specialised at the use site when the specific numeric type is known.
Adding these pragmas improves the LazyText replicate benchmark (see https://gitlab.haskell.org/ghc/ghc/-/issues/22886#note_481020)
https://github.com/haskell/core-libraries-committee/issues/129
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
generalCategory contains a huge literal string but is marked INLINE,
this will duplicate the string into any use site of generalCategory. In
particular generalCategory is used in functions like isSpace and the
literal gets inlined into this function which makes it massive.
https://github.com/haskell/core-libraries-committee/issues/130
Fixes #22949
-------------------------
Metric Decrease:
T4029
T18304
-------------------------
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit cfc8e2e2 introduced a mechanism for handling of exceptions
that occur during Handle finalization, and 372cf730 set the default
handler to print out the error to stderr.
However, #21680 pointed out we might not want to set this by default,
as it might pollute users' terminals with unwanted information.
So, for the time being, the default handler discards the exception.
Fixes #21680
|
| |
|
|
|
|
| |
Fixes #22883.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Explain foldrMap1, foldlMap1, foldlMap1', and foldrMap1' in greater
detail, the text is mostly adapted from documentation of Foldable.
* Describe foldr1, foldl1, foldl1' and foldr1' in terms of the above
functions instead of redoing the full explanation.
* Small updates to documentation of fold1, foldMap1 and toNonEmpty,
again adapting from Foldable.
* Update the foldMap1 example to lists instead of Sum since this is
recommended for lazy right-associative folds.
Fixes #22847
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This allows us to avoid orphans for Foldable1 instances,
fixing #22898.
Updates transformers submodule.
|