- Aug 07, 2024
-
-
Brandon Chinn authored
-
- Aug 06, 2024
-
-
The `mi_usages` field of the interface files must use a deterministic list of `Usage`s to guarantee a deterministic interface. However, this list was, in its origins, constructed from a `ModuleEnv` which uses a non-deterministic ordering that was leaking into the interface. Specifically, ImportedMods = ModuleEnv ... would get converted to a list and then passed to `mkUsageInfo` to construct the Usages. The solution is simple. Back `ImportedMods` with a deterministic map. `Map Module ...` is enough, since the Ord instance for `Module` already uses a stable, deterministic, comparison. Fixes #25131
-
- Aug 03, 2024
-
-
M Taimoor Zaeem authored
-
Sorting the Avails in DocStructures is required to produce fully deterministic interface files in presence of re-exported modules. Fixes #25104
-
- Aug 02, 2024
-
-
Brandon Chinn authored
This commit adds support for multiline strings, proposed at https://github.com/ghc-proposals/ghc-proposals/pull/569. Multiline strings can now be written as: myString = """ this is a multiline string """ The multiline string will have leading indentation stripped away. Full details of this post-processing may be found at the new GHC.Parser.String module. In order to cleanly implement this and maximize reusability, I broke out the lexing logic for strings out of Lexer.x into a new GHC.Parser.String module, which lexes strings with any provided "get next character" function. This also gave us the opportunity to clean up this logic, and even optimize it a bit. With this change, parsing string literals now takes 25% less time and 25% less space.
-
This patch extends the grammar of expressions with syntax that is typically found only in types: * function types (a -> b), (a ->. b), (a %m -> b) * constrained types (ctx => t) * forall-quantification (forall tvs. t) The new forms are guarded behind the RequiredTypeArguments extension, as specified in GHC Proposal #281. Examples: {-# LANGUAGE RequiredTypeArguments #-} e1 = f (Int -> String) -- function type e2 = f (Int %1 -> String) -- linear function type e3 = f (forall a. Bounded a => a) -- forall type, constraint The GHC AST and the TH AST have been extended as follows: syntax | HsExpr | TH.Exp ---------------+----------+-------------- a -> b | HsFunArr | ConE (->) a %m -> b | HsFunArr | ConE FUN ctx => t | HsQual | ConstrainedE forall a. t | HsForAll | ForallE forall a -> t | HsForAll | ForallVisE Additionally, a new warning flag -Wview-pattern-signatures has been introduced to aid with migration to the new precedence of (e -> p :: t). Co-authored-by:
Vladislav Zavialov <vlad.z.4096@gmail.com>
-
- Aug 01, 2024
-
-
Tommy Bidne authored
CLC proposals 231 and 261: - Add exception type metadata to SomeException's displayException. - Add "Exception" header to default exception handler. See: https://github.com/haskell/core-libraries-committee/issues/231 https://github.com/haskell/core-libraries-committee/issues/261 Update stm submodule for test fixes.
-
This commit modifies GHC.HsToCore.Pmc.Solver.generateInhabitingPatterns to prioritise reporting COMPLETE sets in which all of the ConLikes are in scope. This avoids suggesting out of scope constructors when displaying an incomplete pattern match warning, e.g. in baz :: Ordering -> Int baz = \case EQ -> 5 we prefer: Patterns of type 'Ordering' not matched: LT GT over: Patterns of type 'Ordering' not matched: OutOfScope Fixes #25115
-
It was assumed that module names were unique but that isn't true with multiple units. The fix is quite simple, maintain a set of `(ModuleName, UnitId)` and query that to see whether the module has been specified. Fixes #25122
-
Fixes #25091
-
Dump better debugging information when a symbol address is null. Part of the haskell.nix patches upstream project Co-authored-by:
Sylvain Henry <sylvain@haskus.fr>
-
part of the upstream haskell.nix patches
-
A small refactor to use deriving via GHC.Utils.Monad.State.Strict Monad instances for state Monads with unboxed/strict results which all re-implemented the one-shot trick in the instance and used unboxed tuples: * CmmOptM in GHC.Cmm.GenericOpt * RegM in GHC.CmmToAsm.Reg.Linear.State * UniqSM in GHC.Types.Unique.Supply
-
- Jul 30, 2024
-
-
* Incorrect version range on the alpine bindists * Missing underscore in "unknown_versioning" Fixes #25119
-
Also migrate Fixity from GHC.Hs to Language.Haskell.Syntax since it no longer uses any GHC-specific data types. Fixed arrow desugaring bug. (This was dead code before.) Remove mkOpFormRn, it is also dead code, only used in the arrow desugaring now removed. Co-authored-by:
Fabian Kirchner <kirchner@posteo.de> Co-authored-by:
Alan Zimmerman <alan.zimm@gmail.com>
-
- Jul 29, 2024
-
-
Fixes #25081
-
-
- Jul 28, 2024
-
-
This has not existed for over a decade.
-
- Jul 27, 2024
-
-
-
As #25096 showed, the occurrence analyser was getting one-shot info flat out wrong. This commit does two things: * It fixes the bug and actually makes the code a bit tidier too. The work is done in the new function GHC.Core.Opt.OccurAnal.mkRhsOccEnv, especially the bit that prepares the `occ_one_shots` for the RHS. See Note [The OccEnv for a right hand side] * When floating out a binding we must be conservative about one-shot info. But we were zapping the entire demand info, whereas we only really need zap the /top level/ cardinality. See Note [Floatifying demand info when floating] in GHC.Core.Opt.SetLevels For some reason there is a 2.2% improvement in compile-time allocation for CoOpt_Read. Otherwise nickels and dimes. Metric Decrease: CoOpt_Read
-
- Jul 25, 2024
-
-
Andreas Klebinger authored
It seems we reserve 8 registers instead of four for global regs based on the layout in Note [AArch64 Register assignments]. I'm not sure it's neccesary, but for now we just accept this state of affairs and simple update -fregs-graph to account for this.
-
- Jul 24, 2024
-
-
See Note [Case-of-case and full laziness] in GHC.Driver.Config.Core.Opt.Simplify
-
This way the Generically1 newtype could be used to derive Eq1 and Ord1 for user types with DerivingVia. The CLC proposal is https://github.com/haskell/core-libraries-committee/issues/273. The GHC issue is #24312.
-
As #25094 showed, the previous tests for forgetfulness was plain wrong, when there was a forgetful synonym in the RHS of a synonym.
-
- Jul 19, 2024
-
-
Andreas Klebinger authored
This broke configure in subtle ways resulting in #25076 where hadrian didn't end up the boot compiler it was configured to use. This reverts commit 209d09f5.
-
I made some mistakes in 20383006 * Syntax error * The aarch-deb11 bindist doesn't exist I tested against the latest nightly pipeline locally: ``` nix run .gitlab/generate-ci#generate-job-metadata nix shell -f .gitlab/rel_eng/ -c ghcup-metadata --pipeline-id 98286 --version 9.11.20240715 --fragment --date 2024-07-17 --metadata=/tmp/meta ```
-
The tests which relied on find_so would fail when `test` was run before the tree was built. This was because `find_so` was evaluated too eagerly. We can fix this by waiting to query the location of the libraries until after the compiler has built them.
-
- Jul 17, 2024
-
-
The arch argument was ignored when making the jobname, which lead to failures when generating metadata for the alpine_3_18-aarch64 bindist. Fixes #25089
-
- Jul 16, 2024
-
-
Matthew Pickering authored
Since debian 10 is now EOL we migrate onwards to debian 12 as the basis for most platform independent validation jobs.
-
- Jul 15, 2024
-
-
The groups are now split up so it's easier to see which jobs are generated for each platform No change in behaviour, just refactoring.
-
This patch ensures we taken into account COMPLETE pragmas when we compute whether a pattern is irrefutable. In particular, if a pattern synonym is the sole member of a COMPLETE pragma (without a result TyCon), then we consider a pattern match on that pattern synonym to be irrefutable. This affects the desugaring of do blocks, as it ensures we don't use a "fail" operation. Fixes #15681 #16618 #22004
-
- Jul 13, 2024
-
-
The TEST_CC variable should be set based on the test compiler, which may be different to the compiler which is set to CC on your system (for example when cross compiling). Fixes #24946
-
- Jul 12, 2024
-
-
This reduces the number of operations done on each Interface, because supported languages and extensions are determined from architecture and operating system of the build host. This information remains stable across Interfaces, and as such doesn not need to be recovered for each Interface.
-