summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* seqBind after Call Aritywip/T19311Sebastian Graf2021-02-031-1/+2
|
* Add missing instances to ghc-heap typesMatthew Pickering2021-02-022-8/+8
| | | | | | 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.
* typecheck: Eliminate allocations in tc_eq_typeBen Gamari2021-02-021-13/+36
| | | | | | | | | | 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.
* Introduce the DecoratedSDoc typeAlfredo Di Napoli2021-02-0118-111/+125
| | | | | This commit introduces a DecoratedSDoc type which replaces the old ErrDoc, and hopefully better reflects the intent.
* Rename ErrMsg into MsgEnvelopeAlfredo Di Napoli2021-02-0119-129/+143
| | | | Updates Haddock submodule
* Remove ErrDoc and MsgDocAlfredo Di Napoli2021-02-0137-297/+272
| | | | | | | | | | | | | 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.
* Add driver/ghci/ghci-wrapper.cabal to .gitignoreRyan Scott2021-02-012-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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]
* Fix accidental unsoundness in Data.Typeable.Internal.mkTypeLitFromStringRyan Scott2021-02-014-1/+36
| | | | | | | | | 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.
* Documentation fixesKrzysztof Gogolewski2021-01-3015-60/+40
| | | | | | | | | | | | | | | - 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.
* Fix description of -fregs-graph (not implied by -O2, linked issue was closed)Benjamin Maurer2021-01-301-4/+1
|
* Fix -dynamic-too with wired-in modules (#19264)Sylvain Henry2021-01-304-12/+31
| | | | | | | | | | | | | 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.
* Zonk the returned kind in tcFamTyPatsSimon Peyton Jones2021-01-303-0/+44
| | | | | | The motivation is given in Note [tcFamTyPats: zonking the result kind]. Fixes #19250 -- the fix is easy.
* compare-flags: Strip whitespace from flags read from --show-optionsGHC GitLab CI2021-01-301-2/+2
| | | | Otherwise we end up with terminating \r characters on Windows.
* hadrian: Introduce ghci-wrapper packageBen Gamari2021-01-305-16/+101
| | | | | This wraps the existing GHCi wrapper script (driver/ghci/ghci.c) in a cabal file and adds the package to Hadrian.
* configure: Break up AC_CONFIG_FILES listBen Gamari2021-01-301-1/+32
|
* ghci: Take editor from VISUAL environment variableBen Gamari2021-01-303-8/+25
| | | | | | Following the example of `git`, as noted in #19030. Fixes #19030.
* Fix parsing of -fstg-lift-lams-non-recKrzysztof Gogolewski2021-01-293-6/+4
| | | | | | | | -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-*.
* Make PatSyn immutableSimon Peyton Jones2021-01-2929-204/+203
| | | | | | | | | | 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.
* Fix check-uniques scriptKrzysztof Gogolewski2021-01-291-7/+7
| | | | | 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.
* Ppr: compute length of string literals at compile time (#19266)Sylvain Henry2021-01-291-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* Warn about using quick with profilingLeif Metcalf2021-01-291-3/+4
|
* Add missing .hi-boot dependencies with ghc -M (#14482)Sylvain Henry2021-01-2910-2/+72
|
* Add explicit import lists to Data.List importsOleg Grenrus2021-01-2961-68/+71
| | | | | | | | | | | | | 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.
* Remove StgLamLeif Metcalf2021-01-2911-67/+65
| | | | | | | | | | | | | | | | 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.
* typecheck: Account for -XStrict in irrefutability checkBen Gamari2021-01-294-27/+71
| | | | | | | | | | | | | | | | | | | | | | 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.
* Fix strictness in TyCo.Tidy (#14738)Sylvain Henry2021-01-281-18/+38
| | | | | | | | | Metric Decrease: T12545 T14683 T16577 T5321Fun T5642
* Fix code formatting in `HasCallStack` sectionDenis Frezzato2021-01-281-1/+1
|
* Bump haddock submoduleJoachim Breitner2021-01-281-0/+0
| | | | | | | | | | | | | | | | | | | 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
* Reduce default test verbosityMatthew Pickering2021-01-284-4/+12
|
* SimplM: Create uniques via IO instead of threadingAndreas Klebinger2021-01-285-70/+147
|
* Use validate flavour for all CI builds.Andreas Klebinger2021-01-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 -------------------------
* rts: sm/GC.c: make num_idle unsignedAndreas Klebinger2021-01-281-1/+1
| | | | | We compare it to n_gc_idle_threads which is unsigned as well. So make both signed to avoid a warning.
* Implement #18519Koz Ross2021-01-271-0/+38
|
* Respect $AR in configure scriptCheng Shao2021-01-271-1/+2
| | | | | | | | | 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.
* Fix doctest examples in Data.BitsOleg Grenrus2021-01-271-3/+7
|
* Fix spurious failures of T16916 on CI (#16966)Sylvain Henry2021-01-273-13/+46
| | | | | | | | | | | | | * 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.
* hadrian: Fix `lookupInPath` on Windows (#19249)Sebastian Graf2021-01-271-5/+7
| | | | | | 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.
* Remove some redundant validity checks.Richard Eisenberg2021-01-2740-218/+114
| | | | | | | | | | | | 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}
* Add regression test for #11228Adam Gundry2021-01-273-0/+15
|
* Add a section about failable patterns in the GHC user's guideHécate2021-01-271-0/+31
|
* Remove -XMonadFailDesugaring referencesHécate2021-01-277-33/+7
|
* Add instances for GHC.Tuple.SoloBen Gamari2021-01-2728-22/+125
| | | | | | | | | | | | | | | 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
* Add additional context to :doc output (#19055)Aaron Allen2021-01-275-9/+96
| | | | | | 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.
* Deprecate -h flagMatthew Pickering2021-01-276-8/+17
| | | | | | | | | | 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
* Remove ioManager{Start,Die,Wakeup} from IOManager.hDuncan Coutts2021-01-256-15/+34
| | | | | | | | | 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
* Add a common wakeupIOManager hookDuncan Coutts2021-01-253-1/+33
| | | | | | | Use in the scheduler in threaded mode. Replaces the direct call to ioManagerWakeup which are part of specific I/O manager implementations.
* Replace a ioManagerDie call with stopIOManagerDuncan Coutts2021-01-252-1/+14
| | | | | 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 with a new hookDuncan Coutts2021-01-253-3/+48
| | | | | | | | | | 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 hooks for I/O manager startup / shutdown into IOManager.{c,h}Duncan Coutts2021-01-253-20/+88
|
* Move ioManager{Start,Wakeup,Die} to internal IOManager.hDuncan Coutts2021-01-257-14/+16
| | | | | | | | 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.